Div> Background not filling BG vertically

jared_kipe

macrumors 68030
Dec 8, 2003
2,967
1
Seattle
it looks like div#wrapper might be intended to do it (though it doesn't have a background color)

However it will require an actual hight, and since all the elements inside are floated, it doesn't really have one.

Insert a <br style="clear: both;" /> after the close of div#extra and a background color to div#wrapper to do what you want it to do.
 

Dolorian

macrumors 65816
Apr 25, 2007
1,086
0
You could just use:

#container { background-color: #FFC; }

That way it will fill up the entire area with that background color.
 

mwilloam

macrumors newbie
Apr 3, 2010
25
0
I can't see your page as it seems to be offline but another possible fix is to set the containing elements overflow to: "auto". That should vertically expand the container to content height. Otherwise you could also float the container the same as the contained elements, but that may mess with it if you are auto margining to the center. Again, I can't see it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.