W3C home > Mailing lists > Public > www-style@w3.org > March 1997

Styles for Tables elements

From: Hakon Lie <howcome@w3.org>
Date: Fri, 14 Mar 1997 15:39:30 +0100 (MET)
Message-Id: <199703141439.PAA14553@www4.inria.fr>
To: Peter Fraterdeus <peterf@mail.dol.com>
Cc: www-style@w3.org
Peter Fraterdeus writes:

 > The issue is whether Table tags should have style properties.

It's an interesting question. The answer is "yes, but..". See below.

 > Should this work?...
 > 
 > table { font:12pt serif bold } /* is table the parent of tr and td? */

The TABLE element -- like all HTML elements -- have CSS properties so
in principle the above should work. The font weight keyword ('bold')
has to come before the size, though, to distinguish in from a font
family:

   table { font: bold 12pt serif } 

 > td { align:left; font:10pt sans }  /* is font a property of a table cell? */

There is no "align" property in CSS1, but 'text-align' should do the
trick. Also, unless you have a font family called "sans" on your local
system, the 'font' declartaion is not valid -- but 'sans-serif' is:

   td { text-align: left; font: 10pt sans-serif }

 > td.descr  { colspan:2; font:serif bold }

There is no "colspan" property in CSS1, and no apparent replacement.
CSS1 does not describe the full rendering of tables, so you should
contiune to use the COLSPAN attribute in HTML. Also, the 'font'
property require a size in the value:p

   td.descr  { font: bold 100% serif }

The '100%' value will make the font size equivalent to the font size
of the parent element.

Regards,

-h&kon

H      k   o   n      W   i   u   m       L   i   e
howcome@w3.org   W o r l d   Wide  W e b  Consortium
inria # FRANCE http://www.w3.org/people/howcome
Received on Friday, 14 March 1997 09:39:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:49 GMT