Position in IE6: the reason why the absolute positioning layer is not displayed due to absolute failure

Source: Internet
Author: User

I have seen it on the internet several times recently. The conclusion is:

When you find that an element cannot be displayed under IE6 or 7, and the element passes through position absolute, and the elements are floating before and after, you need to consider the sibling element, sometimes it is the front, sometimes it is the back, add a <Div class = "clearboth"> </div>

When restructuring a ticket order page this morning, we need to write an absolute positioning floating layer to match the JS special effect. After writing this, we found that, normally displayed in FF, IE8, IE7, and OP. However, when IE6 is reached, the absolute position of the floating layer cannot be displayed, and the "position: after absolute is removed, it can be displayed. Why?

 

After studying Baidu and Goole for a long time, I finally found the cause. It turns out that the DIV layer next to the floating layer is a left floating layer using "float: left, as a result, the absolute positioning floating layer cannot be displayed under IE6. The solution is to insert a clear floating layer before the absolute positioning floating layer.

 

Conclusion: In IE6, if the position: absolute positioning layer is next to the layer in front of the absolute positioning layer, if the "float" CSS floating attribute is used, the absolute positioning layer cannot be displayed.

Position in IE6: the reason why the absolute positioning layer is not displayed due to absolute failure

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.