CSS empty-cells property
Example
Hide the borders and background of empty cells in a table:
table
{
border-collapse:separate;
empty-cells:hide;
}
Try it »
Property definition and usage
The empty-cells property sets whether empty cells in a table are displayed (only in the "separated borders" model).
| Default value: | show |
|---|---|
| Inherited: | yes |
| Version: | CSS2 |
| JavaScript syntax: | object.style.emptyCells="hide" |
Browser support





All major browsers support the empty-cells property.
**Note:** IE8 supports the empty-cells property only when a !DOCTYPE is specified.
Attribute values
| Value | Description |
|---|---|
| hide | No borders are drawn around empty cells. |
| show | Borders are drawn around empty cells. Default. |
| inherit | Specifies that the empty-cells property should be inherited from the parent element. |
Related Articles
CSS Tutorial: CSS Table