Table formatting: empty-cells
Yet another poorly-supported property for table styling.
The empty-cells property controls whether or not borders and backgrounds are shown for table cells that have no content. All well and good; by clicking the 'show' / 'hide' buttons below, you can see the effect this has:
Browser support for this feature is terribly inconsistent:
- IE (7) doesn't honour this property at all, since it doesn't even bother to show empty cells.
- Opera (9.24) behaves very strangely: it removes the borders, but not the background.
The spec also says:
Furthermore, if all the cells in a row have a value of 'hide' and have no visible content, then the row has zero height and there is vertical border-spacing on only one side of the row.
- Firefox (3.0.1) and WebKit (525.13) do not appear to honour this. They hide the borders and backgrounds, but no change in overall table height occurs. They should render the table something like c) below, which has a
display: none value in order to reduce the row's height to zero:
a) empty-cells: show
| 1 | one |
|
b) empty-cells: hide
| 1 | one |
|
c) display:none set on tr
| 1 | one |
|
Updates
Monday 13th October 2008
- Philippe Wittenbergh tells me that Opera 9.52 now exhibits the same behaviour as Firefox/WebKit, so it's still broken, but not as badly as before.
- Philippe also pointed out that there is a Firefox bug recorded for this very issue. It may be this one. I cannot locate a recorded bug on WebKit's bugzilla installation.