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

HTML vs. CSS on the <table> (was RE: Styling table columns--why s o limited?)

From: <Matthew.van.Eerde@hbinc.com>
Date: Tue, 30 Mar 2004 15:18:50 -0800
Message-ID: <B8B9965E9A4B1948839F37ADCB58E9D58130A8@exchange.hbinc.com>
To: www-style@w3.org

> From: Ernest Cline [mailto:ernestcline@mindspring.com]
> Nope, the problem is that the CSS and HTML table models
> don't interact well.  To get them working well together, it easier
> to modify HTML than to modify CSS.

For example, consider a hypothetical
<grid></grid>
tag that can contain various
<cell></cell> children.

<cell> has rows= and columns= attributes - these are space separated values

<grid id="examplegrid">
<cell rows="1" columns="1">A</cell>
<cell rows="1" columns="2">B</cell>
<cell rows="1" columns="3">C</cell>
<cell rows="2 3" columns="1">D</cell>
<cell rows="2" columns="2 3">E</cell>
<cell rows="3" columns="2 3">F</cell>
</grid>

might render as

+-----+-----+-----+
|  A  |  B  |  C  |
+-----+-----+-----+
|     |     E     |
+  D  +-----------+
|     |     F     |
+-----+-----------+

This would allow row/column styling trivially via constructs such as
#examplegrid
cell[rows=~1]
{	font-weight: bold;
}

#examplegrid
cell[columns=~1]
{	color: green;
}

#examplegrid
cell[columns=~2]
{	border: 1px solid red;
}

etc.

Matthew.van.Eerde@hbinc.com                805.964.4554 x902
Hispanic Business Inc./HireDiversity.com   Software Engineer
perl -e"print join er,reverse',','l hack',' P','Just anoth'"
Received on Tuesday, 30 March 2004 18:18:54 GMT

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