[thelist] Inline CSS
Timothy Joko-Veltman
tim at indigopixel.com
Thu Oct 28 09:42:13 CDT 2004
On Thu, 2004-10-28 at 11:11 -0400, M. Seyon wrote:
> Message from L. Mohan Arun (10/28/2004 04:15 AM)
> >Is it possible to specify inline css for say a table, instead of
> >repeating <FONT><SPAN>or <DIV> tags or placing the style info in
> >stylesheets or in <HEAD>?
> >
> >For example, in the middle of an HTML file, can I say something like:
> >TR {background-color:yellow; }
> >TD { font-color:#ffffff; background-color:green; }
> >and apply it only to the table immediately following it?
>
> Is there a reason why you don't want to put the CSS within the <style> tags
> or in an external stylesheet?
>
> I don't really see any other non-repetitive way of doing this.
>
Even easier ... add class tags to the table rows/cells you want to have
styled, then make rules specifically for them. Saving this in an
external file will facilitate separation of presentation and logic, and
improve bandwidth load, as external stylesheets are usually cached by
the browser.
Regards,
Tim
--
"The resonable man adapts himself to the world; the unresonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man." --George Bernard Shaw
More information about the thelist
mailing list