Home  >  Article  >  Web Front-end  >  Problems caused by ie6 comments_Experience exchange

Problems caused by ie6 comments_Experience exchange

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

Problem: The text in the div frame overflows in IE6. Both IE7 and FF display normally. After testing, it is found that this seems to be related to FLOAT floating. As long as the float in the corresponding div is removed, the display will be normal, but the float is missing. , the position of the div cannot be displayed normally under FF, which really gives me a headache. Today I searched for information on the Internet and found that the text overflow in IE6 was originally caused by comments.
The cause and solution of the problem.

Reason: Most of the text overflow is caused by comments, which is a BUG of IE6. The number of words in the overflow text = the number of comments * 2-1. The number of words here holds true for Chinese or English numbers. The seating position of the annotation is necessarily related to the overflow position, the floating of the block, and the fixed width of the text block.

Solution:
1. Do not place comments. The simplest and fastest solution;
2. Do not place comments between two floating blocks;
3. Include the text block between new

. For example:
↓This is
the extra pig
;
4. Remove the text block The fixed width is similar to 3;
5. Add a
or space after it; (not recommended)
6. Use IE comment format, such as:
7. Add the position:relative; attribute to the box
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