Quantcast
Viewing all articles
Browse latest Browse all 6

Answer by Stickers for Inline element inside inline-block div

The default vertical-align value is baseline, it can be the bottom line of the text or the bottom line of an image (img element is a replaced element, inline* level), which causes the offset in the first row of your demo.

In order to fix it, you can set vertical-align to top, or like you said set img to display: block also works.


Viewing all articles
Browse latest Browse all 6

Trending Articles