IE6 does not RESPECT mah authoritay-- div width

Discussion in 'CSS' started by Stomme poes, Feb 4, 2008.

  1. #1
    This has got to be an easy one; surely it's on teh google but surprisingly I only found lots of stuff about height, and the words "text enlargement" got me lots of penis ads (ug).

    I have a floated div with a set width in pixels. IE6 is (as far as I can see now) the only browser that increases the width as text size is increased. Setting the font-size in pixels would likely save the day, but that's not an option here (unless I make it like 20px font and have some MOSe-browser-only command to move it back to ems...).

    The increased width is giving me a case of float drop. I don't remember having this problem before except once with alt text.
     
    Stomme poes, Feb 4, 2008 IP
  2. babyboy808

    babyboy808 Well-Known Member

    Messages:
    491
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    125
    #2
    Post a link to your page and I'll give you a hand
     
    babyboy808, Feb 4, 2008 IP
  3. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the offer babyboy, but I think I've got a solution.

    Eh, it's normal for IE6 to increase width to accomodate content that cannot wrap such as single words. Stupid browser. My sidebar is only 200px width and is mostly made up of single words, so there's no chance for the words to wrap.

    I ended up using an IE-only property to fix this: word-wrap: break-word.

    Since IE7 was behaving the way I wanted, I hid this behind the Holly hack:

    * html #sidebar {
    word-wrap: break word;
    }

    This stopped IE6 from expanding the width to accommodate the content which made my float too wide and got it dropped. There's likely a better solution but this will do for now.
     
    Stomme poes, Feb 4, 2008 IP
  4. babyboy808

    babyboy808 Well-Known Member

    Messages:
    491
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    125
    #4
    Hey,

    If you want me to do you a quick layout I don't mind, let me know.

    cheers,
    Keith
     
    babyboy808, Feb 4, 2008 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    This was an almost-done layout anyway-- if you're curious you can see it here.

    You can see teh Ugly of the word-break thing. Yuck. But it works. #sidebar is on the right-- wrapped up with negative margins.
     
    Stomme poes, Feb 4, 2008 IP