Text wrap - IE 6 issue

Discussion in 'CSS' started by Atulya, May 30, 2009.

  1. #1
    Last few text from a para getting repeat in IE , can anyone have solution.
    Please check the below image.

    [​IMG]
     
    Atulya, May 30, 2009 IP
  2. CoryR

    CoryR Active Member

    Messages:
    68
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    70
    #2
    word-wrap: break-word; should do the trick.
     
    CoryR, May 31, 2009 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    I think you missed it CoryR - it's not that it's word-wrapping - quite literally Atluya is saying the content - which appears only once in the markup, is rendering twice on the page... I've seen this a good deal with CSS layouts.

    Strange as it sounds, html comments between block level elements, especially when floats are involved can cause all sorts of wierd layout behaviors in IE... The most famous of which are 'disappearing content' and 'double render'... From what I'm seeing you are definately encountering the latter.

    It's why I changed all my comments from this:

    </div><!-- #content -->

    to this:

    <!-- #content --></div>

    Moving the comment before the close (and not using one at the open) eliminates the bug... First try yanking all comments, then slowly add them back in...

    Though if you could post a link to the offending code we could all give you a much better diagnosis.
     
    deathshadow, May 31, 2009 IP
  4. CoryR

    CoryR Active Member

    Messages:
    68
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    70
    #4
    Ah, sorry for the misunderstanding on my behalf.
     
    CoryR, May 31, 2009 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    A very simple solution is to make your float elements {display: inline;}.

    cheers,

    gary
     
    kk5st, May 31, 2009 IP