Problem
I have two divs, one inside the other. I make the inner div have a height of 100px. The problem is that the outer div does not expand to 100px. Instead it stays at 0px height.
Solution
In order for the outer div to expand with the inner div, you must have the following:
- Don’t state a height
- Enclose elements with Float
- Don’t use absolute positioning
source: http://forums.devshed.com/css-help-116/trying-to-make-div-expand-as-div-within-expands-508432.html
keywords: css expand outer div