Why does height property not work in CSS

Sometimes it may appear that CSS property height does not work in certain cases.


However, when reading the specification we learn that height property does not apply for inline, non-replaced elements.

The 'height' property does not apply. The height of the content area should be based on the font, but this specification does not specify how.


The usual solution is to change the display property to something like inline-block if possible.