CSS empty-cells Property

CSS empty-cells property specifies how to browser should render borders and backgrounds around table cells that have no visible content.

CSS empty-cells property has no effect if border-collapse is collapse.

Usages

The following table outline the usages and version history of this property.

Default value: show
Applies to: <td> element
Inherited: Yes
Version: CSS2
JavaScript Syntax: object.style.emptyCells = "hide"

Syntax

Here is a syntax for the CSS empty-cells property

empty-cells: show | hide | initial | inherit;

Property Values

The following table describes the values of this property.

Value Description
show Defaults. Borders and backgrounds are draw around empty cells like in normal cells
hide borders or backgrounds are not drawn around empty cells
initial Sets default value of this property
inherit Inherits this property from its parent element

Examples

The example below shows to sets caption-side property.

.one {
  empty-cells: show;
}
.two {
  empty-cells: hide;
}

Run it...   »

Browser Compatibility

  • Google Chrome 1+
  • Mozilla Firefox 1+
  • Internet Explorer 8+
  • Opera 4+
  • Safari 1.2+

Note: Here details of browser compatibility with version number may be this is bug and not supported. But recommended to always use latest Web browser.