Reply to Re: how to align text in a <td>?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация