div {font-size: xx-large;}
p {font-size: 75%;}
You can also use percentages higher than 100 to increase the child element’s
size relative to its parent, like this:
p {font-size: 145%;}
Specifying Absolute Measured Sizes ..........................................................
You can also avoid the relativistic specifications discussed so far and force
type size to be a particular unit of measurement, such as .5 inch or 12 points.
Recall that the available units of measurement are px (pixels), pt (points),
pc (picas), mm (millimeters), cm (centimeters), in (inches), em (the current
element’s approximate font size), and ex (x-height, the height of the lower-
case letter xin the current font). This example specifies that paragraph text
should be two-tenths of an inch and level-one headlines should be 24 points:
body {font-size: .2in;}
h1 {font-size: 24pt;}
Most designers use pt or px when specifying font sizes in CSS rules, so you
might as well join them. You probably already have a sense of how pt or px
work, so stick with what you know.
Figure 5-8:
Using the
relative
values
smaller
and
larger
adjusts an
element’s
text size in
relation to
its parent
element.
Chapter 5: All About Text 99