【发布时间】:2011-07-09 09:41:37
【问题描述】:
目前我所有的 css 精灵都是垂直对齐的,并且格式不正确。我将如何水平对齐它们?这是我的一个按钮的示例:
a.youtube {
background: url(images/icons.png) no-repeat 0 0;
height: 64px;
width: 64px;
display: block;
background-position: 0 -128px;
}
a.youtube:hover {
background-position: -64px -128px;
}
我现在无法使用以下方法将它们与中心对齐:
#social_cont {
text-align: center;
background: url(images/banners/banner1.jpg);
height: 254px;
}
还有这个html:
<div id="social">
<a class="facebook" href="http://facebook.com/projectstratos"></a><a class="twitter" href="http://twitter.com/projectstratos"></a>
</div>
【问题讨论】:
-
水平还是垂直?下定决心。
-
格式不正确怎么办?
标签: css button alignment css-sprites