Prev | Current Page 109 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"

2 ems, or 16 ?— 1.2 =
19.2 pixels.)
Let??™s now go on and set the font sizes for other elements in your
markup, as follows

STYLIN??™ FONTS AND TEXT 79
This results in Figure 3.9.
FIGURE 3.9 Tag selectors now let us
specify sizes for all the tags in the
document. Some tags are directly
styled, while others inherit their sizes
from their styled parent elements.
A couple of points about these styles: ?¬? rst, you didn??™t set a style
for the list item (li) elements of the two lists, but you did for the
ordered list (ol) and unordered list (ul) elements that respectively
contain them. If you styled the li element, both lists would display
in the same size, but because you styled the ol and ul elements
instead, the li elements inherit their values, and you can later make
the lists??™ items different sizes if you want.
Inherited Styles in Nested Tags
Secondly, although you are already making a nice improvement
to the unstyled layout with which you started, the font size for the
bulleted unordered list (ul) is very small, even though it??™s set to the
same size as the ordered list (ol).
STYLIN??™ WITH CSS - CHAPTER 3 80
This problem is caused by the fact that the ul element is set to .


Pages:
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121