这个问题一直让我疯狂。我一直试图让我的输入字段与自定义背景在IE中正确对齐。我读过其他问题,表示行高将解决它,但那还没有奏效。在IE中不垂直对齐的输入字段
在chorme/safari/etc中看起来很好,但在IE8中,文本被卡在输入区域的顶部。 (Stack不会让我发布图像)。我的CSS是:
#email {
background: url('BACKGROUND IMAGE') left top no-repeat;
background-size: 273px 38px;
width: 273px;
height: 38px;
line-height: 38px;
border: 0;
margin: 0 0 5px;
font: bold 12px arial, helvetica, sans-serif;
color: #777;
padding:0 8px;
outline: none;
float:left;
}
和HTML:
<input id="email" type="text" name="email" size="14" value="your email address" onfocus="if(this.value=='your email address') {this.style.color='#333'; this.value='';}" onblur="if(this.value== '') {this.style.color='#808080'; this.value='your email address';}" />
如何让我的输入文本垂直中心在IE 8和较低的任何想法?
链接到可用的页面? – Rooster 2012-04-10 19:06:35