Birowsky Birowsky - 9 months ago 66
CSS Question

Unexpected resulting box height

I'm setting:

font-size: 13.44px
line-height: 1.4881

Multiplying those, gives us 20.000064

But the rendered/calculated height of the box is 19px


Answer Source

The font-size seems to be rounded up or down for this calculation.

When I increase your CSS font-size to 13.6px (via Chrome's "Inspect" function), the text container height was increased from 19px to 20px.

enter image description here

You may want to try to use "Inspect" with your browser and interactively adjust these CSS settings to get your desired results.