I have a container and a image inside it. When the parent is given float
, there is a height mismatch in the child. When both are given float
it matches. Why?
<div class="parent"><img src="images/trest.png" class="image"></img></div>
Mismatches when:
.parent{
float:left;
}
.image{}
Perfect when:
.parent{
float:left;
}
.image{
float:left;
}