0
inline-block的,表单元格,行高,等这一切没有影响我的文字的对齐......文本将不会垂直对齐内部事业部无论什么
演示:http://colechrzan.com/tv_rewrite
HTML:
<div class="toolbar">
<form>
<div class="search">
<input type="text">
<div class="remove">Clear</div>
</div>
</form>
</div>
CSS:
.remove {
background: #fff;
display: inline-block;
color: #1E1E20;
position: absolute;
top: 50%;
margin-top: -16px;
left: calc(50% + 15px);
height: 32px;
padding: 0 4px;
line-height: 32px;
text-align: center;
vertical-align: middle;
font: 18px 'Open Sans';
}
我测试过无数的解决方案,并没有什么事S;对齐总是保持现在的样子。
可能重复? ](http://stackoverflow.com/questions/489340/how-do-i-vertically-align-text-next-to-an-image-with-css) –
什么形象?...... – tenub
你为什么反正使用div而不是按钮?这就像用一个袋子当锤子一样。是的,完全无稽之谈。 – Areks