Ulysses
05-21-2005, 04:59 PM
The route of this problem annoyed me a long time ago on a large project, and I came accross it again today. Hopefully, it may save someone else's sanity:
Taken from http://www.positioniseverything.net/explorer/dup-characters.html
Internet Explorer 6 has a puzzling bug involving multiple floated elements; text characters from the last of the floated elements are sometimes duplicated below the last float. This bug is a real headbanger because there seems to be nothing triggering it. However, by now everyone should know that IE needs no excuse to misbehave.
The direct cause is nothing more than ordinary HTML comments, such as, <!-- end left column -->, sandwiched between floats that come in sequence. Apparently, the comments are hard for IE to digest when they occupy those positions, resulting in a kind of "screen diarrhea". HTML comments inside the floats do not cause the bug, nor do comments before or after the float series. Only comments residing between floats cause the bug.
The effect seen is that some of the last characters from the last floated element of the series are repeated outside and below that floated element. The first sandwiched comment does nothing unusual, but two comments cause the last two characters in that last float to repeat. Each additional comment makes two more characters join the party. It doesn't matter which pair of floats straddle the comments. In fact the two triggering comments may follow different floats as long as they have floats both before and after them.
My additional experience, is that html comments can also break up the flow of floated elements, particularly when using CSS to create stacked divs akin to rows in a table. The general effect is that the latter rows become irratic, and will not adhere to a sensicle stacking order, but rather produce vertical margins between rows, and even prevent child elements within the stacked divs from floating propely too. The outcome; a bloody mess.
Taken from http://www.positioniseverything.net/explorer/dup-characters.html
Internet Explorer 6 has a puzzling bug involving multiple floated elements; text characters from the last of the floated elements are sometimes duplicated below the last float. This bug is a real headbanger because there seems to be nothing triggering it. However, by now everyone should know that IE needs no excuse to misbehave.
The direct cause is nothing more than ordinary HTML comments, such as, <!-- end left column -->, sandwiched between floats that come in sequence. Apparently, the comments are hard for IE to digest when they occupy those positions, resulting in a kind of "screen diarrhea". HTML comments inside the floats do not cause the bug, nor do comments before or after the float series. Only comments residing between floats cause the bug.
The effect seen is that some of the last characters from the last floated element of the series are repeated outside and below that floated element. The first sandwiched comment does nothing unusual, but two comments cause the last two characters in that last float to repeat. Each additional comment makes two more characters join the party. It doesn't matter which pair of floats straddle the comments. In fact the two triggering comments may follow different floats as long as they have floats both before and after them.
My additional experience, is that html comments can also break up the flow of floated elements, particularly when using CSS to create stacked divs akin to rows in a table. The general effect is that the latter rows become irratic, and will not adhere to a sensicle stacking order, but rather produce vertical margins between rows, and even prevent child elements within the stacked divs from floating propely too. The outcome; a bloody mess.