html - CSS IE 输入框 "padding-right"问题

标签 html css

我遇到了一个问题,我尝试在谷歌和此处进行搜索,但是,无法找到正确的解决方案。让我简短...

我有一个名为 #email_input_box 的 div,其中包含 <input type="text" class="email_box" border="0" style="padding-left:10px; padding-right:10px; margin:0; border:0;" />

问题在于填充文本,它在其他浏览器中工作正常,但是在 IE7 中不起作用。

这是我的 .email_box 类样式

.email_box{
    width:160px;
    height:26px;
    background:url(images/inputbox_email.png) no-repeat;
    line-height:26px;
    color:#969595;
    font-family:Tahoma, Geneva, sans-serif;
    font-size:12px;
    font-style:normal;




}

这是我的 div #email_input_box 样式

#email_input_box{
    width:180px;
    height:26px;
    float:left;
    position:absolute;
    top:60px;


}

我需要有关 IE7 中 padding-right 问题的帮助。谢谢!

最佳答案

input 没有border 属性,删除它。

<input type="text" class="email_box" style="padding-left:10px; padding-right:10px; margin:0; border:0;" />

这可能会解决问题。但是,即使没有,也应该将其删除。

包含输入的 div 的宽度也小于输入的宽度。

关于html - CSS IE 输入框 "padding-right"问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8623093/

相关文章:

html - 让 flex 元素同时拉伸(stretch)和垂直居中内容?

html - 移动设备的 Bootstrap 顶部菜单不起作用

css - :first-child Where Class is :not(. 禁用)

css - CSS outline-color 属性在 firefox 中不起作用吗?例如: input:focus {outline-color:#9aadee; }

html - 突出显示时删除文本上方/下方的空间

php - 数据库未填充

html - IE9 : <ul> and rtl 上的奇怪错误

html - CSS滚动固定侧边栏

css - 我如何使用 React Bootstrap 在导航栏中显示 Logo ?

html - 为什么在线对齐在 Opera 上不起作用?