Reputation: 59660
When I give float:left and float:right to inner divs. The height property of their parent div doesn't works. Why? How to solve?
jsfiddle to demonstrate the problem.
Upvotes: 2
Views: 1807
Reputation: 6192
Add this line before the closing of parent div
<br style="clear:both"/>
Upvotes: 6
Reputation: 9685
Harry's right. For completeness: floating the parent also works, as does adding a cleared element (or pseudo-element) at the bottom.
Upvotes: 0