我已经设计了一个提交按钮并希望将其居中。这是CSS:
.outer {
text-align: center;
}
/* BUTTONS */
.buttons button{
cursor: pointer;
cursor: hand;
border: 0;
height: 28px;
float: left;
text-indent: 4px;
text-decoration:none;
font-weight: bold;
text-transform: uppercase;
font-size: 1.2em;
background: url(../images/button.png);
}
.buttons span{ /* Right-hand corner */
cursor: pointer;
cursor: hand;
display: block;
width: 5px;
height: 28px;
float: left;
background: url(../images/button.png) top right;
}
这是html:
<div class="outer">
<div class="buttons">
<button type="submit">SUBMIT</button><span></span>
</div>
</div>
我从http://www.scottking.com.au/blog/2009/03/custom-styled-css-html-input-buttons/#.Uc2IYdjcAix复制了这段代码
到目前为止一直无法居中对齐这个按钮。