The resulting
page might not look quite as ???designery,??? but at least people will be able to read it.
Setting text using keywords and percentages
A combination of keywords and percentages became fairly popular for a while on the
Web. Available keyword values are xx-small, x-small, small, medium, large, x-large, and
xx-large. A keyword is used to set the base value, using a body selector in CSS, and percentages
are then used to set sizes for specific elements, such as headings, paragraphs, and
lists. Here??™s an example:
body {
font-size: small;
}
p {
font-size: 93%;
}
Keyword values don??™t compound, and most modern browsers set a lower limit, even
on xx-small, so text tends never to enter the realm of the illegible.
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
80
Although Internet Explorer for Windows can resize text set with keywords (as can all other
browsers), this method has several disadvantages. The most problematic from a design
perspective is that percentage values aren??™t particularly consistent across browsers and
platforms. Scaling tends to ???jump??? at fairly arbitrary percentage sizes, so while 93% may
look the same in all browsers (using default font-size settings, at least), 94% may look like
100% in one and 93% in another. Also, it??™s often tricky to equate percentages with the pixel
(or point) sizes typically used in mock-ups.
Also, browsers have historically dealt with keywords badly.
Pages:
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153