![]() | |
|
The basics
|
Font Sizes
Font size can be defined as a pixel size, a percentage, or in em units. It is strongly recommended that you use percentages or em units to define your font sizes. If you define a absolute pixel value, the font size will not change when IE/Windows users try to increase or decrease the font size to meet their own needs. Percentage values set the size of the font relative to its parent element. Em units set the size of the font relative to what it would have been if you had applied no font size at all. Font size can be a bit tricky; use trial and error and make sure to check your page in multiple browsers.
h2 {font-size: 200%;}
li {font-size: 0.9em;}
p.disclaimer {font-size: 10px;}
Line heightUse the
h1 {line-height: 0.9;}
p {line-height: 1.2;}
#mainlist li {line-height: 200%;}
|
![]() |
|