|
Posted by Alan J. Flavell on 06/01/06 20:30
On Thu, 1 Jun 2006, John Salerno wrote:
> Uh oh, situation: I need the text in some of these cells also to be
> red, but I can't specify more than one class per <td> element,
> right?
Actually you can. class="alarm text" would match both .alarm
and .text selectors in your stylesheet.
http://www.w3.org/TR/REC-html40/struct/global.html#adef-class
So you could style the .text as right-align, and the .alarm as red.
Some older browser/versions might not grok that, but I think it's
pretty well covered nowadays.
You could of course assign two different classes - say, text and
atext, one of which is styled for only right-alignment, and the other
is red *and* right-alignment. Your choice, really, but the latter is
going to be somewhat better supported.
Naturally you should pick class names which mean something to your
particular situation. I was just illustrating possibilities.
[Back to original message]
|