I have a div 'a' ( simple div)
and div 'b' which is float:left;
I was wondering what is the correct method to set the height of div 'a' to be a perfect wrapper for div 'b' ( in terms of height).

i know there are some options :
1)set 'a' : overflow:hidden ( it works).
2)set at the end of 'b' div with 'clear':both
) i would love to know more options ( besides fixed height to div 'a'...)
) and of course , what is the better way.
@Royi Namir; there others mades like clearfix like this
css:
.clearfix:after {
display: block;
content: " ";
clear: both;
}
as per the better way clearfix & overflow:hidden both are better because you no need to write any extra markup in your html for every element.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With