The absolute positioning element of IE disappears mysteriously.

Source: Internet
Author: User
In IE6 or IE7, when an absolutely positioned Div locates beside a float Div, it maybe disappeared.

========================================================== ==========================================

In IE6 or IE7, when an absolute positioning element is adjacent to a floating element, the absolute positioning element may disappear. It is possible that IE6 and IE7 are not in the same situation.

The following is a demo. Use IE6, IE7, and FF for comparative browsing.

1. demo1: When the width of the adjacent floating layer of the absolute positioning layer is not equal to the width of the parent layer, and the floating layer is not cleared, IE6, 7, and FF are consistent.

Absolutefloat

2. demo2: When the width of the adjacent floating layer of the absolute positioning layer is not equal to the width of the parent layer, IE6/7 does not display the absolute positioning layer, and FF is displayed. Absolutefloat

3. demo3: When the width of the adjacent floating layer of the absolute positioning layer is equal to the width of the parent layer, and the floating layer is not cleared, IE6 does not display the absolute positioning layer, and IE7/FF is displayed. Absolutefloatfloat

4. demo4: When the width of the adjacent floating layer of the absolute positioning layer is equal to the width of the parent layer, IE6/7 does not display the absolute positioning layer, and FF is displayed. Absolutefloatfloat

5. demo5, with the same effect as demo3,
In demo3, the width of two floating layers is equal to the width of the parent layer, and demo5 is the width of a floating layer equal to the width of the parent layer. Absolutefloat

========================================================== ====================================

The comparison results are indeed complicated, and FF is always browsed normally. At the bottom of the article, there is still a problem with IE processing floating and positioning elements. Therefore, the solution to this bug is also very simple, so that the absolute positioning layer can be placed without the floating layer.

To fix this bug is just not setting the absolutely positioned Div beside the float Div.

Related Article

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.