Reputation: 11011
I've got a main container, with floating divs in it. It stops before them and doesn't reach their bottom? What's the best cross-browser way of fixing that?
(page in question is http://lauradifazio.altervista.org/cms/ and the main container is a red div which stops under the cyan+orange one, because that one isn't floated)
Upvotes: 0
Views: 267
Reputation: 963
There are mainly two ways of achieving this result, you need to either:
Since this concept is at the base of css design, I strongly advise you to have a look at this book: Gianluca Troiani - CSS: guida completa it covers all the aspects of css layout and coul really change your life.. it changed mine! :)
Buona fortuna
Upvotes: 1
Reputation: 186582
#container { overflow:hidden; zoom:1; }
To clear floats using hasLayout for IE, block formatting context for other.
This has gotta be the most asked CSS question on SO :)
Upvotes: 0