CSS string question

What is the ideal line-height and what type of value should be used with line height, em, px or percent values?

+4
source share
5 answers

em is relative and will scale well when / if your users change the size of the text (which, for example, my mother often does for readability).

+4
source

Usually for a comfortable reading it is read that the line height should be 1.5-2 times the font size.

 p{ font: normal 10pt/15pt sans-serif; } 

Please note that this depends on the font you are using. In web design, every rule must be accepted with salt.

+4
source

Many people tend to use 1.2-1.5 em , as it is relative to your font size and has a nice look 'to it. I am sure that the typographer could explain in more detail where these values ​​came from.

+4
source

As Alex points out, you should use em, percent, or integers for linear height so that it scales well. See the line-height on the Mozilla Developer Network for more details.

 p{ font: normal 10pt/1.5 sans-serif; } 
+1
source

All Articles