How about using 'small', 'x-small', 'large', 'x-large'?
That's what I use in my CSS.
This is ok, but beware of a IE5/Win bug:
"The nature of the discrepancy is that WinIE4/5 implements “small” as the initial value, rather than “medium” as called for in CSS-1. The result is that without correction, all sizes specified in keywords will be one size smaller with respect to user preferences in conformant browsers than in WinIE4/5."
for a workaround.
Actually, many web authors prefer "font-size keywords" since they never can get too small - which is possible with em or percent. And: ems and percents cascade, so you have to be careful constructing your CSS cascade.
Apart from that, IMO it is personal preference. With em and percent you can specify (relative) sizes in smaller units. If you don't need that, so what.
Another thing: If you specify the width of block level elements in em (I sometimes use that for the navigation bar in an all-out liquid design) then you might be more comfortable with specifying font-size in em es well, it is just more intuitive (at least for me).
"If you have knowledge, let others light their candles in it."
Thanx for the great information!
Do you mind if I post this on our class messageboard? (Bakersfield College - Dreamweaver) We are discussing this subject this week.
Re the great font size debate--
Best use according to the css experts at css-discuss suggests using 100.01% on the body (makes Opera play nicely) then defining in either ems or percentages from there on the inner elements. This allows fonts to scale (pixel defined fonts will not scale in IE, the browser used, unfortunately, by the majority), avoids the major bugs (like the one in IE that's kicked off when you define fonts in em on the body) and is Bobby safe for accessibility which could be important going forward since more and more countries are legislating accessibility. Pixels or points to define font size are a huge "worst use."
Oh, one more thing:
Keith, the b tag for bold text has been deprecated. The strong tag is now used instead, since it has semantic meaning for alternative devices such as screen readers for the blind. I agree with your point about web readers needing bite size pieces with captions and subtitles, but how we do it in our code is equally important for accessibility.I might add that when putting copy on a website it is good to consider your formatting dynamics. I've found that many web users are "subtitle-ers" and "caption-readers". Get the message in your "caption" sentences and or <h3></h3> them.
I'd have to add that the ALA styleswitcher is a *very* worthwhile investment of time. Just be sure to clearly mark its location on the page for the users, so that if they're struggling with one design they can switch to a friendlier one.
RE the great font size debate, All of the techniques have their uses--being able to maintain an *exact* size across all browsers via screen resolution (px), or across all resolutions via browser (em), or relative to the rest of the document (big, etc.) all have their place. For example, in any case where the pixel size relative to nearby images is critical, and the image is not a vector graphic, you'll probabably want to use px. A lot of sites are designed around such images, because the same "look" cannot be achieved the same way liquidly without truly advanced knowledge of CSS design, which is time-consuming to acquire and expensive (or should be ^_^) to hire. Not to mention almost impossible to incorporate in a style-switching schema, for reasons too in-depth to go into here. Oh--and px *is* accessable to anyone who cares to try. One of these days I'm going to put up a good "use this stylesheet" to download for sight challenged people, along with IE instructions.... Anyway, the control to cancel font styling is right there in options->accessability, and I hear IE7 will give text size control (along with the newfangled "tabs"--way to catch up with the curve, Mr. Ballmer....)
--Geek With a Guitar
I'm a big fan of the ALA styleswitcher too. It would be great if we could all get away from the idea that a site has to have just one style.
The Firefox/Mozilla families of browsers have the right idea by allowing users to choose alternate stylesheets. It would be even better if they could remember stylesheet preferences from one page to the next, but that's what the ALA script is good for.
No matter how well you plan your design, someone can always come along with an obscure accessibility problem or quirky monitor settings that you don't expect. Having a variety of designs available can help you please all your visitors.
Regarding font sizes, it's considered polite to use percentages to conform to Bobby standards for the disabled. I compromise by using percentages except in crucial size related spots like a horizontal menu.
Also, someone mentioned using [b] and <h3>. It's best to markup important text with headers, in order, down from <h1>. Breaks up the page, and helps the spiders figure out what's important.
Excellent Post, Almost every company in the world is trying to make their make on the web.
However creating a nice looking, functional web site is not very easy to achieve unless you have the right tools and workers to help you.
Web Design Wexford
Web Design Ireland