我得到了这个css:
#footerLinks {
text-align: center;
margin: auto;
}
#footerLinks a {
float: left;
color: #c2c2c2;
display: block;
font-size: 12px;
margin-right: 10px;
}和这个html:
<div id="footerLinks">
<a href="">No Porn on App Store</a>
<a href="">Porn and Apple</a>
<a href="">iPhone Porn Wiki</a>
</div>问题是超链接不会在页面的中心。我尝试了margin: auto,text-align,并尝试玩margins都不起作用,为什么?
发布于 2012-11-01 20:16:35
从此类中删除float:left;和display:block;
#footerLinks a {
color:#c2c2c2;
font-size: 12px;
margin-right: 10px;
}发布于 2012-11-02 21:48:17
更新你的css。
#footerLinks {
text-align: center;
margin: auto;
}
#footerLinks a {
color: #c2c2c2;
font-size: 12px;
margin-right: 10px;
}https://stackoverflow.com/questions/13176851
复制相似问题