Possible Duplicate:
Why does overflow hidden stop floating elements escaping their container?
Why my div element has not been show inside my ul and li?
Why my li is acting as inline element if I set that it is block?
Take a look at this code:
http://jsfiddle.net/jNkZP/
Your
divs are floating inside thelis. When an element contains nothing but floating objects, it collapses. More eloquently put:Solution: Look into clearfix or any of its alternatives.
For example, I used
overflow: hidden;to demonstrate my point: http://jsfiddle.net/jNkZP/23/