Remove white space below image
This question already has an answer here:
You're seeing the space for descenders (the bits that hang off the bottom of 'y' and 'p') because img
is an inline element by default. This removes the gap:
.youtube-thumb img { display: block; }
You can use code below if you don't want to modify block mode:
img{vertical-align:text-bottom}
Or you can use following as Stuart suggests:
img{vertical-align:bottom}
If you would like to preserve the image as inline you can put vertical-align: top
or vertical-align: bottom
on it. By default it is aligned on the baseline hence the few pixels beneath it.
上一篇: 向左飘浮; vs display:inline; vs display:inline
下一篇: 删除图像下方的空白区域