css help

Out of context: Reply #15

  • Started
  • Last post
  • 15 Responses
  • thismanslife0

    I'm a little rusty with CSS but I think it's because IE "imagines" there is text (a space character) in your DIV, even when there isn't any, and so the box is stretched out to the default text height (body text). That's (probably) why the overflow trick works, it tells the DIV to let the contents spill over and not stretch out the box.

    Try setting your body text to some huge size and see if the box gets bigger (don't forget to remove the overflow fix first)... just to test my theory. If it does get even bigger, I'm right. Then put back your overflow fix (or set the font size / line-height of text in the div to be tiny) and you're done.

    For the record, all those reset things wont help you in this case, a DIV has no padding, no margin etc etc to be reset, they're all already zero.

View thread