Graphics Programs Reference
In-Depth Information
Figure 3-2: Increased line-height.
h ere's no space between the font-size and line-height values, just a forward slash.
(In case you're wondering, this is the only place in the whole of CSS that uses a forward slash.)
Adding the line-height to a font declaration is always optional, but if you do include it,
its placement is not. You must immediately follow the font's size with a forward slash and the
line-height value.
h e property line-height can accept unitless number values. You can also give line-
height united values, though generally you shouldn't.
So what's the dif erence? When you dei ne a united value, like 1em or 100% , you're setting
things up to pass along the computed result to any descendants. For example, suppose the
following CSS is applied to a document containing the following markup fragment:
ul { font-size : 15px ; line-height : 1em ;}
li { font-size : 10px ;}
small { font-size : 80% ;}
< ul>
< li>I'm a list item with < small>small text< / small>.< / li>
</ ul>
Search WWH ::

Custom Search