Answers for "Image inside div has extra space below the image"

0

Image inside div has extra space below the image

By default, an image is rendered inline, like a letter so it sits on the same line that a, b, c and d sit on.

There is space below that line for the descenders you find on letters like g, j, p and q.

Demonstration of descenders

You can:

adjust the vertical-align of the image to position it elsewhere (e.g. the middle) or
change the display so it isn't inline.
Posted by: Guest on February-01-2022

Code answers related to "Image inside div has extra space below the image"

Browse Popular Code Answers by Language