3PX Solution under IE6 Browser

Source: Internet
Author: User

3PX solution under IE6 Browser:
The production of 3px problems under IE6 should mainly be attributed to the irregular writing, for example, we want to write a structure of the left and right two columns, the code is as follows:

<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.51texiao.cn/" /><title>Ant Tribe</title><styletype= "Text/css">. Parent{width:300px;Height:300px;Background-color:Red;}. Left{float: Left;width:100px;Height:100px;Background-color:Green;}. Right{width:100px;Height:100px;Background-color:Blue}</style></Head><Body><Divclass= "Parent">  <Divclass= "Left"></Div>  <Divclass= "Right"></Div></Div></Body></HTML>

In the above code, the left div is floating, the second div is non-floating, so the 3px problem will be created under IE6. In fact, the problem itself is due to code writing is not standard, in the standard browser, because the first div floating out of the document flow, then the next Div will fill the position of the Div, then the page is the result of the first Div will overwrite the second Div, which itself is not a canonical way to write. The solution is to let the second div float. Modify the code as follows:

<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.51texiao.cn/" /><title>Ant Tribe</title><styletype= "Text/css">. Parent{width:300px;Height:300px;Background-color:Red;}. Left{float: Left;width:100px;Height:100px;Background-color:Green;}. Right{float: Left;width:100px;Height:100px;Background-color:Blue}</style></Head><Body><Divclass= "Parent">  <Divclass= "Left"></Div>  <Divclass= "Right"></Div></Div></Body></HTML>

The original address is: http://www.51texiao.cn/div_cssjiaocheng/2015/0501/497.html

3PX Solution under IE6 Browser

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.