How to hide the horizontal scroll bar bug in IE6 on frameset, iframe, and frame framework pages
When you use a frame (frameset, frame, iframe) to nest a webpage, if the height of the Child webpage exceeds the preset height, the scroll bar, that is, the size overflow, will appear, generally, a vertical scroll bar appears when the height is exceeded, and a horizontal scroll bar appears when the width is exceeded. However, in IE6, as long as the size is greater than or equal to the predefined height, two scroll bars will appear together, this seems like a bug.
Solution:
Set css on the sub-page as follows: the most important thing in this section is to set overflow-y to scroll. In this way, if a vertical scroll bar is forced to appear, the horizontal scroll bar will not be displayed, if the width is too large, the horizontal scroll bar will still exceed. In this case, you can set overflow-x: hidden;, but accordingly, the user cannot scroll the subpage.
Copy to ClipboardReference: [www.bkjia.com] html {
Overflow-y: auto! Important;
* Overflow-y: scroll;
}
The reason for adding overflow-y: auto! Important;, because IE7 does not have this bug, and firefox can recognize overflow-y, which is said to be the private attribute of IE ......, So we need to set overflow back.
The above method can be improved.
Since only IE6 has this BUG, you can only write it for IE6.
Html {_ overflow-y: scroll ;}
_ Underline is proprietary to IE6, saving a line of code and Improving Efficiency