[thelist] Re: other CSS2 question

Matt m at pleonasm.com
Tue May 22 03:54:49 CDT 2001

ppk wrote:
>>P { font: 12pt/18pt a font; text-indent: 0; }
>Can anyone explain the 12pt/18pt bit above? I've seen it often but I don't 
>have the faintest idea what it means. When do you get 12pt and when 18pt?

12pt (12 points) is the height of the text itself. 18pt (18 points) is the
line height. Generally, text is more easy to read with a bit of breathing
space above and below it, so it's often nice to set this with CSS.

In this case, the difference between 18 and 12 is 6. These 6 points are
distributed evenly below and above the text. So, the text is 12 points
high, with 3 points of empty space above and 3 points of empty space below:
total line-height = 18 points.

Line-height can also be expressed as a percentage (e.g. 12pt/150%), which
generally allows for better font scaling as the base font size change.


More information about the thelist mailing list