Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorNinjabiscuit
    • CommentTimeMay 29th 2008 edited
     permalink
    Hi,

    I've been a front end developer for a while now and though I've spent a good while googling and fiddling I've never gotten to the bottom of figuring out a particular quirk of ie6.

    It seems that in certain circumstances ie6 will render the last few characters of a piece of text again. I don't have a live example but I'll try to illustrate my point through the medium of the text editor.

    Imagine you had an a tag (in my experience this usually occurs in a tags or inputs) in a div or p tag containing text:
    ___________
    |this is text |
    ----------

    ie6 sometimes takes it upon itself to display the last few characters again under that container

    ___________
    |this is text |
    ----------

    xt

    The only way I have managed to counteract this is by putting redundant html under the container, which seems to reduce the excess text.

    I was wondering if anybody had experienced anything similar and whether or not there is a more semantic approach to dealing with it.

    Thanks in advance
    • CommentAuthorkesav
    • CommentTimeMay 29th 2008
     permalink
    Hi Ninjabiscuit,
    I have faced it before... try removing comments one by one from your HTML page. This may sound idiotic... but it works... Please don't ask the reason

    -Cheers!
    Kesav
    Thankful People: Ninjabiscuit
  1.  permalink
    THAT IS WEIRD!

    It absolutely works. I removed all the comments from the page and now the errant text has gone. It's good to know I'm not the only one who has been tearing my hair out over this one. Thanks Kesav, you're a genius!

    I'd still like to know the origin of this little oddity though, and whether or not it has a name. Any ideas?

    Thanks again.
  2.  permalink
    This is caused by comments between floated elements and is known as the "Duplicate Characters Bug".
  3.  permalink
    Thanks Kari,

    At least now I have something to put it down to, and something to call it by.

    Very useful!
  4.  permalink
    Check out PositionIsEverything for a comprehensive explanation of all sorts of IE bugs
    • CommentAuthortechunar
    • CommentTimeMay 30th 2008
     permalink
    very useful, thanks!
    •  
      CommentAuthorTetsuo
    • CommentTimeMay 30th 2008
     permalink
    Interesting, I never knew that. I'm sure I've seen this bug before - good to know there's a solution to it :)
    •  
      CommentAuthorTetsuo
    • CommentTimeJul 15th 2008
     permalink
    Update: I noticed this bug again on some work I'm doing at the moment, but this time it wasn't caused by comments. As noted by Position Is Everything, the bug can also be caused by elements not having Layout.

    So, the fix I found to work was to apply
    display:block;
    to give the element Layout. Simple.

    Hopefully this will be of use to anyone else who still encounters it after removing comments.
    • CommentAuthorJaneck
    • CommentTimeJul 25th 2008
     permalink
    To my knowledge with the bug, it's caused by floats not closed properly. After you are done with your floats (say images in a line) have a <div style="clear:both;height:0px;overflow:hidden"></div> for good measure. But I'm 100% sure it's caused by floats.
  5.  permalink
    I'm pretty sure adding meaningless markup isn't the way to go. Don't use empty elements to clear floats. In fact; don't use empty elements, period.
    • CommentAuthorJaneck
    • CommentTimeJul 28th 2008
     permalink
    I'll have to disagree on that. The cleared div is an immensely useful element.
    • CommentAuthorkesav
    • CommentTimeJul 29th 2008
     permalink
    janeck,

    kari.patila is correct... he says not to use empty elements ... He means do not add a tag just to set clear both. Use the existing element next to the floated element.
  6.  permalink
    Or in a case where there isn't an element to clear the float, use the clearfix method instead.
Add your comments
    Username Password
  • Format comments as (Help)