[thelist] CSS for tables..

Aylard JA (James) jaylard at equilon.com
Wed Aug 23 10:51:42 CDT 2000


Eduardo Dominguez wrote:
>    Being new to css, i was wondering if i can apply a style
> to a whole table in the <table> tag and not in every
> <td> or <tr>. I want, if possible, to define cellpad, cellspace,
> width and font.
> 
> Is this possible ??

	In IE4+, yes, this does work. In Netscape 4+ (including Netscape 6
-- so far, at least), this does not work. In my experience, the most
reliable way to format elements within a table using a style sheet is to set
properties on the <td> element; the <tr> element often works well, too,
although it may be best to apply styles to the <tr> only when you want to
achieve row-level formatting (e.g., alternating background colors on rows of
a spreadsheet). Applying styles to the <td> may well necessitate use of
classes, of course.

James Aylard
jaylard at equilon.com





More information about the thelist mailing list