Home > Article > Web Front-end > ie6 compatibility issue record_html/css_WEB-ITnose
1. In the code, writing em to newline will create a blank. Remove spaces between em tags without line breaks.
2. Use margin to set a negative value to solve the bug of modules being pushed and wrapped in ie6.
3. Method to clear float: Add overflow: hidden to parent element.
4. Several block-level elements such as div and span are juxtaposed in ie6. Some are not set to float and some are set to float right. The width of one line is enough to fit all the block-level elements, but at this time ie6 displays one of the right-floated elements. Line break
*You can exchange the positions of the two parts of the code
Disadvantages: Destruction of semantics
*Absolute positioning.
Advantages: Does not destroy semantics.
Disadvantages: Increased code volume.
*Add floats to them all.
Advantages: Same as above.
Disadvantages: It will cause other bugs, etc. .
*Add hack. _margin-top:XXXXpx;
Advantages: Same as above.
Disadvantages: Use of hack.
5. When the sub-element of li in ie6 has the display:block style, it will cause white space between li. Add _display: inline to li.
6. When a contains inline elements, clicking on the blank part is invalid. Solution: add a background color to a.