
Originally Posted by
ristenk1
Do most websites use this method?
Methods vary widely. It falls to the author what methods they use. This method of assigning a font size property to a class is very specific, and perhaps would not do (in and of itself) in a larger production, as there may be unnecessary repetition.
Say for instance you want all paragraphs in the content section of your page to have one size:
Code:
CSS
#content p {font-size: 14px;}
While I am in favor of proportional font-size, screen zooming as opposed to only text zooming has made the case for scaling a moot point... to some degree. However, I argue for proportional because it aligns the entire document to the user's own scale when the page opens. Eg.,
Code:
CSS
body {
font-size: 100%;
}
#content p {
font-size: 80%;
}
The first accepts the user's system font size as a base.
The second knocks it down 20% to fit more in line with typical prose text.
We could apply it to lists in similar fashion. Eg.,
Code:
CSS
#content p, li {
font-size: 80%;
}
li li {
font-size: 100%;
}
The second in this case forces nested lists to adopt the font size inherited from the parent, without further scaling (which would become 64% of the base in the first nest, 51% in the second nest, and on down if we didn't stop it in its tracks with this rule).