CSS empty-cells property


Hide the border and background of empty cells in the table:

table
{
border-collapse:separate;
empty-cells:hide;
}

Try it out . . .

Description of property definition and use

The empty-cells property settings whether empty cells in the table are displayed (only in Split Borders mode).

Default: show
Inherited: yes
Version: CSS2
JavaScript syntax: object .style.emptyCells="hide"


Browser support

CSS Empty-cells property CSS Empty-cells property CSS Empty-cells property CSS Empty-cells property CSS Empty-cells property

All major browsers support the empty-cells property.

Note: Only specify! DOCTYPE, IE8 only supports the empty-cells property.


The property value

Value Describe
hide The border is not drawn around an empty cell.
show Draws a border around an empty cell. Default.
inherit Specifies that the value of the empty-cells property should be inherited from the parent element.


Related articles

CSS tutorial: CSS Table