As you can see in the above example , there is extra height of about 6px on the div
.
That extra height is gone if line-height is changed to ~1px (link).
So line-height affects images too ?
As you can see in the above example , there is extra height of about 6px on the div
.
That extra height is gone if line-height is changed to ~1px (link).
So line-height affects images too ?
Images by default are defined as inline elements so they follow text rules, you can either set the container height to match the images', or give the image
display: block
orvertical-align: bottom
.