Home  >  Article  >  Web Front-end  >  For IE6 input, if the width is set and more characters are input, will the input be blocked? _html/css_WEB-ITnose

For IE6 input, if the width is set and more characters are input, will the input be blocked? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:14:011165browse



.se_name{ width: 110px; height: 23px; background: url(../ images/search_bg.jpg) no-repeat; color: #c0c0c0; border: none; margin-right: 8px; line-height: 23px; padding-left: 4px;}


If entered The character width does not exceed the set width and the display is normal
Under IE6, if the input characters exceed the set width, they will be pushed to the left

How to solve this problem


Reply to discussion (solution)

Refactor the html

Refactor the html



This is what I mean, it just started to display Normally it is this picture

If you enter too many characters, it will look like this

Set an appropriate width value (width) for the text box. However, it is difficult to accurately control the border of the text box when you use border:0 and background images. For example, if you set the width of the text box to 100px, and view the box model under a standard browser, the width will be 100px, but in IE6 The view below /7/8 is 102px, there are differences between browsers.

I didn’t look carefully enough just now. It turns out that you have already set the width value. Using IETester's IE6.0 mode test, the situation you mentioned did not occur. Is the border width of the background image the same as the set width of 110px?

Set the background-attachment attribute to fixed.
background: url(../images/search_bg.jpg) no-repeat fixed;
I wonder if it achieves the effect you want?

Set the background-attachment attribute to fixed.
background: url(../images/search_bg.jpg) no-repeat fixed;
I wonder if it achieves the effect you want?
Thank you, solved.

Set an appropriate width value for the text box. However, it is difficult to accurately control the border of the text box when you use border:0 and background images. For example, if you set the width of the text box to 100px, and view the box model under a standard browser, the width will be 100px, but in IE6 The view below /7/8 is 102px, there are differences between browsers.
Thanks for the explanation, I haven’t noticed this yet

So is the background of the text box still displayed under Firefox?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn