5% of something other than
16 pixels. Still, few people muck around with their browser settings, and the general consensus
in the industry is that the 62.5% method is the one to go for.
There is one other thing to bear in mind, though: Internet Explorer (again). Although the
majority of browser-specific issues are left until Chapter 9 of this book, we??™ll make an
exception now. Internet Explorer has problems with text-zooming when the font size is set
below 100%, so an additional rule is required:
html {
font-size: 100%;
}
This doesn??™t adversely affect other browsers, so you??™ll find this rule in the boilerplate documents
from the download files, even thought it should technically be in the conditional
comments documents.
Setting line height
Graphic designers will be familiar with leading, and the CSS line-height property enables
you to set this. Generally speaking, it??™s a good idea to be fairly generous with leading for
web pages, because text is harder to read onscreen than in print; by placing larger gaps
between each line, the eye can more easily scan through large blocks of text.
When setting line-height, you have various options, and can use a number, length, or
percentage:
h1 {
font-size: 14px;
line-height: 20px;
}
h2 {
font-size: 1.3em;
line-height: 1.6em;
}
If using this method, ensure that the font-size setting of all text-oriented elements
you use on the site is adjusted, otherwise you??™ll end up with some illegible text set at
62.
Pages:
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156