CSS empty-cells Property
Example
Hide border and background on empty cells in a table:
table
{
border-collapse: separate;
empty-cells: hide;
}
Try it yourself »
Definition and Usage
The empty-cells property sets whether or not to display borders and background on empty cells in a table (only for the "separated borders" model).
Default value: | show |
---|---|
Inherited: | yes |
Animatable: | no. Read about animatable |
Version: | CSS2 |
JavaScript syntax: | object.style.emptyCells="hide" Try it |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | ||||||
---|---|---|---|---|---|---|
empty-cells | 1.0 | 12.0 | 8.0 | 1.0 | 1.2 | 4.0 |
Note: IE8 supports the empty-cells property only if a !DOCTYPE is specified.
CSS Syntax
empty-cells: show|hide|initial|inherit;
Property Values
Value | Description | Play it |
---|---|---|
show | Background and borders are shown on empty cells. This is default | Play it » |
hide | No background or borders are shown on empty cells | Play it » |
initial | Sets this property to its default value. Read about initial | Play it » |
inherit | Inherits this property from its parent element. Read about inherit |
Related Pages
CSS tutorial: CSS Table
HTML DOM reference: emptyCells property