<div class="button">
<p>
<style>
a.button1 {
float: left;
height: 398px;
margin: 59px 0px 0px 17px;
background-image: url("i/about-button.gif");
text-indent: -9999px;
display: inline-block;
}
a#about-button {
width: 340px;
background-position: 0px 0px;}
a#about-button:hover {
background-position: 0px -796px;}
a#about-button:active {
background-position: 0px -398px;}</style>
<body>
<a href="about.html" class="button1" id="about-button" image></a>
</body>
</p>
</div>
好吧,我是这方面的菜鸟,所以请耐心等待。我正在尝试将导航按钮对齐在中心。也就是说,无论您的窗口有多宽,它们大部分都将停留在中间。现在,它们都向左对齐。
我有 a.button1、a.button2、a.button3 和 a.button4。它们彼此完美对齐;我只需要弄清楚如何让它们都移动到中心。抱歉,但我无法在其他主题中找到对我的代码有帮助的答案。帮助!