Reputation: 41
What is the ideal line-height and what type of value should I use with line-height values, em, px or percentages?
Upvotes: 4
Views: 968
Reputation: 2657
As Alex points out, you should use em, percent or whole numbers for line-height so it scales well. See line-height on the Mozilla Developer's Network reference for further explanation.
p{
font: normal 10pt/1.5 sans-serif;
}
Upvotes: 1
Reputation: 2914
A lot of people tend to use 1.2-1.5 em as this is relative to your font size and had a nice 'look' to it. I am sure a typographer could explain more fully where those values come from.
Upvotes: 4
Reputation: 17974
It is usually considered for a comfortable reading experience that line height should be 1.5 to 2 times the size of the font.
p{
font: normal 10pt/15pt sans-serif;
}
Note that it depends on the font you use. In web design, every rule has to be taken with a grain of salt.
Upvotes: 4
Reputation: 19315
em
is relative and will scale nicely when/if your users change the text size (which my mom, for example, often does for readability reasons).
Upvotes: 4