Home >Web Front-end >CSS Tutorial >How to write css to solve the IE6 3-pixel bug_Experience exchange
As long as IE's hasLayout is triggered, non-floated elements will have layout. Therefore, this problem can be fixed by using the unique hack rules of IE6 and writing a separate style for it:
_zoom:1;
margin-left: value;
_margin-left: value-3px;
zoom is one of the conditions for IE to trigger Layout. Because it is a CSS rule unique to IE, zoom is used.
margin-left: value-3px is to fix the 3px bug in IE6.
Previously, the method of floating non-floating elements was used to fix the bug. Now we can try this new method!
Note: The underscore in front is specially written for hacks below IE7!