Textbox background image pushing out in IE 6 & IE 7

前端 未结 1 1952
慢半拍i
慢半拍i 2020-12-21 20:21

Please see this jsFiddle example. The background image I have used on textbox pushes out of view in IE when you type in long values:

相关标签:
1条回答
  • 2020-12-21 21:21

    A classic IE bug..

    There is no clean workaround. You have to wrap the input in another element such as a div, and apply the background to that instead.

    See in IE7: http://jsfiddle.net/P47sa/3/

    Here's a random page on the Internet that agrees with me: http://blogs.creative-jar.com/post/Input-backgrounds-scrolling-in-IE.aspx

    If your page makes heavy use of JavaScript/jQuery, you could use that to apply the fix instead of cluttering up the HTML.

    0 讨论(0)
提交回复
热议问题