Previous Message
Next Message

Re: [css-d] CSS: multiple selectors within one class attribute

Sent by Arlen P Walker on 11 February 2003 20:08


>Is it common practice to use multiple selectors within one class
>attribute or am I simply not doing things in a correct manner?

My personal opinion? It's the latter. But that and a fiver might get you a
cup of coffe at Starbucks.

To me, what you're doing is not an improvement over the <font> tag. Yes,
there are multiple sizes and colors of type. But if you have three colors
and 4 sizes, that doesn't mean you'd need 12 classes. Typically your body
text will all be one size (I said "typically") and the other sizes will be
headers. Also typically, the color of your text will change with a section.

For example, you might have three different headings on a page, so three
sizes of text. Now you have two sections on this page as well, each with a
different color of text. But the headers are the same color as the text, so
you change colors with the section and chage sizes with the headers. Since
the <hx> tags change the size by default based on an initial starting
point, you don't need classes; at the worst you'll need to style each one
of the header tags with a size. Class the divs with the color scheme for
the section, and you're home. Two classes defined, perhaps with some tag
styling as well. If you want to change the color of the headings in a
section to a color not the same as the text, then you can alwasy use the
"#sect1 h1, #sect1 h2" syntax to do it.

The problem I have with your system is that by tying the class names so
closely to what they are, it requires editing every page when you want to
change the site appearance, rather than just the css file.

Have fun,
Arlen
Chief Managing Director In Charge, Department of Redundancy Department
DNRC 224

[EMAIL-REMOVED]
----------------------------------------------
In God we trust; all others must provide data.
----------------------------------------------
Opinions expressed are mine and mine alone.
If JCI had an opinion on this, they'd hire someone else to deliver it.
Previous Message
Next Message

Possibly related: