3px extra height on div with image inside it

I am working on a new site, but there is a small thing that I simply cannot omit.

Basically, I create a website where users can upload funny pictures. Although in the area where the image is displayed, there is a gap of 3 pixels. Here is a link to a screenshot of what I mean, a dead link.

I tried a lot of things, but nothing works. If anyone can suggest a solution, do it.

Thank.

+5
source share
1 answer

This is due to the default value of vertical-alignimages. They are baseline. Go to topor bottomand it will disappear.

img{
    vertical-align: top;
}

- , , , y g.

+11

All Articles