Reputation: 11069
I have the div div.home-top
with two other divs div#home-content
as float:left
and div#home-buttons
as float:right
.
And below the div#home-top
got the div#home-footer
as clear:both
My div#home-top
is the minimum size.
I put it in red, but I can not see it.
How to make the div#home-top
take on the height divs children.
See the code.
Upvotes: 3
Views: 3524
Reputation: 253506
Add overflow: hidden;
to the CSS for div#home-top
:
div#home-top
{
background-color:Red;
overflow: hidden;
}
Upvotes: 11
Reputation: 28936
Floated divs have no height, so .home-top does not expand. You will need to give it an explicit height or unfloat the inner elements.
Upvotes: 2