linked to a single entry in a *.css file?

by Cliff Rockson <rockson3(at)pacbell.net>

 Date:  Tue, 28 Mar 2000 23:15:57 -0800
 To:  "hwg-techniques(at)mail.hwg.or" <hwg-techniques(at)mail.hwg.org>
  todo: View Thread, Original
Ignore the following question folks, I posted it yesterday in HTML outgoing
mail format,(no wonder nobody answered it). I did however find the answer on
my own and would like to share the results with those of you who are
writting HTML at my level(novice).

Q. Can several specific tables and frames, background color(of the same
color), be linked to a single entry in a *.css file?

A. No (I think?). At least not when the site uses both tables and frames. If
only using tables, then one entry(per color) is enough.

The solution I found, was to add these lines or more, depending on how many
colors the site uses, to my *.css file.

TD#c {background: #FFFFCC} <!-- Light Yellow -->
BODY#c {background: #FFFFCC} <!-- Light Yellow -->

Then wherever I want that color, I add ID=c to the appropriate table or
frame(to the BODY tag in the case of an inline frame).

i.e.
<TD ID=c>
<BODY ID=c>

This seems to work fine in IE 5.0, and Netscape Communicator 4.05(except for
frames in the later). I don't know how this works in any other browsers.

Feedback, comments or suggestions welcome.

Cliff Rockson
rockson3(at)pacbell.net

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA