Home >Web Front-end >CSS Tutorial >How to write css to solve the IE6 3-pixel bug_Experience exchange

How to write css to solve the IE6 3-pixel bug_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:04:151935browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn