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