W3C home > Mailing lists > Public > www-style@w3.org > September 2000

Empty table cells

From: Jonas Sicking <sicking@bigfoot.com>
Date: Tue, 19 Sep 2000 01:21:26 +0200
Message-ID: <00cd01c021c7$2b419260$3110f7d4@ericsson.se>
To: <www-style@w3.org>
Hi!

The CSS2 spec says in chapter 17.5.1
http://www.w3.org/TR/REC-CSS2/tables.html#table-layers point 6

"The topmost layer contains the cells themselves. As the figure shows,
although all rows contain the same number of cells, not every cell may have
specified content. These "empty" cells are transparent, letting lower layers
shine through."

This would mean that table-cells that have no content should be hidden.
There is however a property 'empty-cells' that says that empty cells indeed
should have borders.

I see three problems with this.

1. It is not possible to display backgrounds on empty cells.

I.e. the following rule would still not make give the cell a green
background.

TD#AnEmptyCell { empty-cells: show; background: green }

2. CSS tables is incompatible with HTML tables.

HTML has no special rules for empty cells so they should have backgrounds
just as any other HTML element.

3. 'empty-cells: show' is not a very good name

It gives the impression that empty cells should be shown when in fact the
cell is hidden with exception of it's borders.

My proposed solution is that empty tablecells should get no special
treatment except when empty-cells are set to 'hide'. The difference would be
showing backgrounds and outlines (and maybe other things in the future) for
the cell when appropriate.

/ Jonas Sicking
Received on Monday, 18 September 2000 19:20:40 GMT

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