SoFunction
Updated on 2025-02-28

IE6 comments caused by problems

Problem: The text in the div framework overflows in IE6, and both IE7 and FF are displayed normally. After testing, it was found that this seems to be related to FLOAT floating. As long as the float in the corresponding div is removed, it can be displayed normally. However, float is missing, and the location of the div cannot be displayed normally under FF. It really gave me a headache. Today I was looking for information online and found that the text overflow in IE6 was caused by comments.
Causes of the problem and solutions.

Reason: Most of the text overflow is caused by comments. It belongs to IE6 bugs. The number of words overflowing text = the number of words in comments * 2-1. The number of words here is true when Chinese or English numbers. Note The sitting position is necessarily related to the overflow position, the floating block, and the fixed width of the text block.

Solution:
1. No comments are placed. The easiest and fastest solution;
2. Do not place comments between 2 floating blocks;
3. Include text blocks between new <div></div>, such as: <div style="float:right;width:400px"><div>↓This is
It is the extra pig</div></div>;
4. Remove the fixed width of the text block, which has similarities with 3;
5. Add a <br /> or space afterwards; (not recommended)
6. Use IE annotation format, such as: <!--[if IE]>test<![endif]-->
7. Add position:relative; attribute to the box