开发者

IE 8 input type text/password bug

<tr>
 <td>Password:</td>
  <td><input type="password" name="j_password" id="j_password"/></td>
</tr>

The code above increases the CSS offset of the input element 6 pixels right. If the type is changed to 'text' as opposed to 'password' the CSS offset is not increased.

I would file this as a bug with MS but I don't h开发者_运维问答ave the time nor energy to jump through their hoops. In addition it's common knowledge that IE is a sub-standard browser. We strongly encourage all of our users to abandon IE in favor of a standards-compliant browser.


Form elements have different margins/paddings etc. on different browsers, even if you're using some sort of stylings reset on the root (such as <body>). This isn't an IE issue, IE just likes to make it more prominent than others.


Not sure if this helps, but have you tried a Browser Reset CSS stylesheet?
http://developer.yahoo.com/yui/reset/

It may remove the additional styles on the password input


If this "bug" only occurs on IE, use a style sheet within a conditional comment so only IE will parse and use it. But be aware, it's just a happy accident that "text" and "password" input fields both render the same in other browsers. (It's easier to do so on most OSes, including Windows, but it's not required that they look identical.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜