css – IE8中的垂直对齐不正确

我的搜索框中的默认文字在Chrome,FF和Safari(vertical-align:middle)中看起来不错。

但是,默认文本会上升到IE 8中搜索框的顶部。

有IE的解决方法吗?谢谢你的帮助。

HTML:

<input type="text" class="text" value="Search" title="Search" />

CSS:

.text {
    height: 47px;
    font-size: 18px;
    margin: 0; 
    padding: 0 5px 0 45px;
}

解决方法

您是否尝试将行高设置为与文本框的高度相匹配?文本应该自动出现在行的中间

相关文章

Css常用的排序方式权重分配 排序方式: 1、按类型&#160;...
原文:https://www.cnblogs.com/wenruo/p/9732704.html 先上...
css属性:word-wrap:break-word; 与 word-break:break-all 的...
https://destiny001.gitee.io/color/
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML...
css之background的cover和contain的缩放背景图 对于这两个属...