I have a div and an image inside it
<div>
<img src="logo.png">
</div>
img {
float: left;
}
I can see the div
have collapsed, the height have become to 0,
my first question is, but the image is inside the, cuz the div's height is 0,why the image still can be see?
I know the solution like give the div a overflow
property, even to auto
. But why it can solve the problem?