Thursday, October 28, 2010

IE6 phantom text

I have come across an IE6 bug, whereby text is shown at the bottom of page.
This text is not meant to be there and is a replica of text already shown within the div.

In my case, the last div in the page needed to have the following CSS added to it:

myDiv
{
/* IE6 hack. 
          If not applied, (lots of) phantom characters appear at the bottom
          of the page!!!! 
        */

_float:none;
_clear:both;
}

Here is a severely simplified extract of my html

<div>
  <div>
    <div>
      <div>
      ...
      ....
      </div>
      <div id="myDiv">
        <ul></ul>
      </div>
   </div>
 </div>
</div>
    
NOTE:
This bug can also be triggered when two or more HTML comments are placed between floated elements, like DIV etc.


Google 'IE6 ghost bug' or 'IE duplicate characters' for more info.

These articles have some more info on this

ps: Comments and/or links to this article are most welcome!

No comments:

Post a Comment