Set Body{overflow:hidden on Ie6,ie7;} Invalid bug

Source: Internet
Author: User

Ie6,ie7 set the Body{overflow:hidden;} Invalid bug

Recently done Project Discovery set Body{overflow:hidden under IE7;} After the vertical scroll bar will appear, so check the Internet, here to record:

Set Body{overflow:hidden;} : IE6 IE7 does not take effect. IE6 horizontal longitudinal scroll bar are in, IE7 vertical scroll bar is still in;

  Analysis Reason:
Chrome, Firefox will initially pay the value to html{overflow:visible;}

IE6 initial pay value html{overflow-x:auto;overflow-y:scroll;}

IE7 initial pay value html{overflow-x:visible;overflow-y:scroll;}

Only the DOM root node (that is, the HTML root) is set html{overflow:visible;} , the browser applies the overflow value in the BODY element to the view area.

As an example,

Set Body{overflow:hidden}, there will also be scroll bar, but this scroll bar is not body, is HTML, only you set html{overflow:visible;} body{overflow Value} can be passed to html{} to the. In this way, the value of HTML becomes {Overflow:hidden},ok has no scroll bar. It is clear that this is not a bug, but rather a problem that arises from different browser initial values.

So the above problem is to solve the problem that exists under IE6 and IE7 by setting the value of HTML overflow.

has been verified, this method can be!!!!!!

Set Body{overflow:hidden on Ie6,ie7;} Invalid bug

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.