Style Sheets
Andrew J. Mutch
amutch at tln.lib.mi.us
Mon Sep 8 09:21:14 EDT 1997
Tom,
Like you, I've used my style sheets for consistent elements. However, it
seems to me that once you get around to defining specific elements, in
terms of time and effort in creating and adding class-specific elements, I
wonder how this is an improvement over what we currently do. It seems
like a lot of code to add for what appears to be, at best, a minor
improvement.
Maybe, I just need to see some "good" examples of how style sheets can be
implemented along these lines. Some of the examples at the Netscape site
are quite atrocious looking...they make me think of blinking backgrounds.
Andrew
> I'm not at all sure I see the problem here. A style sheet can be used to
> define the default appearance for any element. If you'd like to suggest
> that all the <EM> elements in a page have a yellow background (like a
> highlighter), you simply write that into the stylesheet--EM {background:
> yellow}--and that's it. If you'd like to apply this highlighting only to a
> subset of your <EM> elements, you define that as a new
> class--EM.highlighted {background: yellow}--and then add the necessary
> class attributes only to the EM tags you wish.
>
> I don't see the use of stylesheets as being a commitment to define the
> appearance of every element in every page on your Web site; browser
> defaults aren't usually *that* atrocious. But if you find yourself
> defining many of them the same way, you might find it easier to apply the
> styles you like to the BODY element and let other elements inherit them.
>
> Our site, for example, uses a single linked stylesheet for almost every
> page on the site, so we certainly don't have to go through page by page and
> identify styles we want to define. Then we get most of what we want out
> of:
>
> BODY {font-family: Arial, Geneva, Helvetica, sans-serif;
> background: #FFFFFF}
>
> (I know: dull, but legible.)
>
> Thomas Dowling
> Ohio Library and Information Network
> tdowling at ohiolink.edu
>
More information about the Web4lib
mailing list