Wrapper Background Not Showing in FF

Discussion in 'CSS' started by sunster13, Apr 12, 2008.

  1. #1
    sunster13, Apr 12, 2008 IP
  2. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You are actually witnessing an IE bug. Your wrapper is filled with floats. As far as #wrapper is concerned, the very tops of the floats are the only place #wrapper sees anything in it (not counting header, I mean the columns left, center and right). Floats do not normally affect their parents, and usually hang out. IE incorrectly has containers wrapping their floats. A well-known bug.

    Firefox isn't the only browser displaying your site correctly-- Opera and Safari are too.

    To make #wrapper notice its floated children, you can do a trick: setting the overflow property to something other than its default (which is visible) will make the #wrapper take notice of its children. Overflow: hidden is the most popular one as it won't give you ugly scrollbars. Other ways around the problem are things like clearfix-- you can find these other methods by googling "enclose floats" Position Is Everything (you'll get both positioniseverything.com's float page and also Gary Turner's page).
     
    Stomme poes, Apr 12, 2008 IP
  3. sunster13

    sunster13 Active Member

    Messages:
    169
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Putting overflow: hidden on the wrapper tag worked, thanks. :)
     
    sunster13, Apr 12, 2008 IP