Sometimes, float box out of parent box, I have to add “width:100%;overflow:hidden” to parent to stop this.
So, why float box can out of parent? Is this a standard behavior?
<div style=" border:1px solid #F00">
<div style="float:left">float</div>
</div>
This is a pitfall which I think everyone has fallen into, probably on more than one occasion.
Here are some good resources for understanding how CSS floats work: