CSS empty-cells
Property
Topic: CSS3 Properties ReferencePrev|Next
Description
The empty-cells
CSS property show or hide borders and backgrounds of table cells that have no visible content. A non-breaking space (
) is considered as a visible content.
The following table summarizes the usages context and the version history of this property.
Default value: | show |
---|---|
Applies to: | The table-cell elements |
Inherited: | Yes |
Animatable: | No. See animatable properties. |
Version: | CSS 2, 3 |
Syntax
The syntax of the property is given with:
The example below shows the empty-cells
property in action.
Example
Try this code »table {
empty-cells: show;
}
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
show |
Borders and backgrounds are drawn around empty cells like normal cells. This is default value. |
hide |
No borders or backgrounds are drawn around empty cells. |
initial |
Sets this property to its default value. |
inherit |
If specified, the associated element takes the computed value of its parent element empty-cells property. |
Browser Compatibility
The empty-cells
property is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: CSS Tables.
Related properties: table-layout
, border-collapse
, border-spacing