html - Image inside div has extra space below the image -


why in following code height of div bigger height of img ? there gap below image, doesn't seems padding/margin.

what gap or space below image?

#wrapper {    border: 1px solid red;    width:200px;  }  img {    width:200px;  }
<div id="wrapper">    <img src="http://i.imgur.com/recdv24.jpg" />  </div>

image gap or white space under it

by default, image rendered inline, letter.

it sits on same line a, b, c , d sit on.

there space below line descenders find on letters f, j, p , q.

you can adjust vertical-align of image position elsewhere (e.g. middle) or change display isn't inline.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -