Unitless line-heights
I can officially chalk this one up in the “I did not know that” category — and continue to be amazed by Eric Meyer’s CSS knowledge. He can explain it better than I, but to simplify you do not need to include a unit of measure when declaring line-height. Let’s say you have set the line-height to n for a paragraph. With no unit of measure attached to that value, the n acts as a multiplier on the declared font-size to build the correct line-height .
Reader Comments
2 Responses to “Unitless line-heights”
Nick Toye February 11th, 2006
Does the only apply to font-sizes that are defined in pixels or can it also apply to font-sizes with keywords or percentages.
reh3 February 13th, 2006
According to Eric’s article it should work the same across all font-size measurements (em, %)