Re: Syle Sheets Fonts
by "Art Zoller Wagner" <art(at)zollerwagner.com>
|
|
Stephanie is right. There are quirks to css, one being that the cascade
isn't always complete, especially with <TD>'s.
Some people define a general category for all tags and then get specific
from there:
blockquote, body, div, form, h1, h2, h3, h4, h5, h6, li, ol, p, select, td,
tr, ul, textarea, input {color: #000000; background: #FFFFFF; font-family:
Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: 500;
text-align: left;}
I think much of the problem is with Netscape (can't recall whether it's the
old 4.xx or the newer, too) which doesn't cascade body tag's settings to
lower block elements.
I have also had to remove input & textarea to get grey buttons and input
and textareas with a grey background and black text.
Font-size is very difficult to do well in a complex site with % and em.
After several years of using em, I had to revert back to px when the new
Netscape came out. You can read all about the issues in:
http://www.alistapart.com/stories/fear4/
I was surprised to learn that people who are vision-impaired use much more
powerful tools than increasing font sizes in their browser. So this idea
that we have to let the user set the font sizes may not be accurate. I no
longer feel at all "bad" for using px.
There is an interesting alternative suggested in this site, but it strikes
me as a temporary fix that could blow out in the future:
http://www.thenoodleincident.com/tutorials/box_lesson/font/
CSS isn't quite as easy as it could be, but it sure is easy to maintain a
site once you get it working. You need to pay close attention to detail as
you write the css or it will break. Little things matter greatly.
You should also have a good reference, like Eric Meyer's Cascading Style
Sheets so you don't have to ask others for help all the time.
Art
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA