I have an image in a div, lets say like so:
<div>
<img src="myimage.png">
</div>
The style for the div, is line-height:36px;
The image's height is 12px
This code lives on many web sites (think a button / badge etc.) - it essentially always works. But occasionally the div collapses around the image, and I'm trying to figure out why.
If I place an
next to the image, the line-height begins to work again.
Setting the image to inline, giving the div a specific font-size, did not seem to make a difference