The problem of absolute location of IE6 and its solving method

Source: Internet
Author: User

The problem of absolute location of IE6 and its solving method

IE6 the absolute location of the bug and its solution. Position:absolute locating errors in the left and bottom positions under IE6:


Example Source Code


Left positioning error under IE6 –>




Left positioning error under <!–ie6 –>


The above code locates errors in the IE6.


There are two ways to solve this problem:


1. Set Zoom:1 trigger layout for parent layer.


2. Set the width of the parent layer.


Example Source Code


– Workaround 1 zoom:1–>


– Workaround 2 Set width–>


Below this code under IE6, bottom positioning error:


Example Source Code


Bottom positioning error under –ie6 –>

>


The workaround is similar to the left location:


Method 1 is to set the Zoom trigger layout for the parent layer.


Method 2 Sets the height for the parent layer.


Example Source Code


– Workaround 1 zoom:1–>


– Workaround 2 Set height–>


IE6 Many bugs can be resolved by triggering layout, the above solution whether set zoom:1 or set width and height is actually to trigger layout. The following CSS properties or values will let an element get layout:


Position:absolute the containing block (containing block) of an absolutely positioned element will often cause problems in this regard


Float:left|right because of the characteristics of the layout element, the floating model will have a lot of weird performance


Display:inline-block when an inline-level element requires layout, it is often used, which may also be the only effect of this CSS property-to have an element have layout


Width: Any value except auto


Height: any value except auto


Zoom: Any value except auto


The problem of absolute location of IE6 and its solving method

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.