0
我有一个搜索框,如下图所示。我想将文本对齐到中心位置,现在搜索框内的文字稍微偏上。下面是它的CSS。这种情况只发生在IE浏览器中。火狐很好。如何将文本对齐到中心对于IE浏览器
.search_results_input {
background-color: #EEEEEE;
border: 1px solid #CCCCCC;
font: 12px/24px AntennaRegular,Arial,Helvetica,Sans-serif;
height: 30px;
width: 300px;
}
将搜索框/文本的html包含在前面会有所帮助。 – m4tt1mus 2012-02-21 18:26:59
以下链接可能是您想要的。 http://stackoverflow.com/questions/326650/vertically-align-text-within-input-field-of-fixed-height-without-display-table – sparrow 2012-02-21 18:28:48
在IE浏览器中工作正常http:// jsfiddle.net/SWBwt/ – m4tt1mus 2012-02-21 18:29:55