我无法在Internet Explorer的输入字段中垂直对齐文本.
我有:
- input#search {
- float:left;
- font-size:11px;
- height:20px;
- margin:0;
- padding-left:4px;
- width:100px;
- }
在Firefox和Chrome中,它似乎是自动垂直对齐的,但是在Internet Explorer中却不是.
解决方法
只需设置输入对象的高度和行高,即可正常工作(即7).
- input { border: 0; font-size: 0.8em; height: 32px; line-height: 32px;}
GL保罗布埃诺