Why my inline-block divs are not aligned when only one of them has text? [duplicate]

Adding:

vertical-align: bottom;

To your second rule should make it work. Apparently, inline-blocks with no text are rendered as inline-images or something else, and the vertical-align of these elements are incorrect, so forcing them to be aligned to bottom fixes the issue.

Source: inline-block element with no text renders differently

Leave a Comment