CSS empty-cells Property

Example

Display no borders on empty cells in a table:

table {
  empty-cells: hide;
}

Definition and Usage

The empty-cells property sets whether or not to display borders on empty cells in a table.

Note: This property has no effect if border-collapse is "collapse".

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

  • Inherited : "Inherited = yes" means that it can takes (inherit) it's value from it's parent element.
  • object - object in javascript means the element on which empty-cells is applied.
  • Animatable - "Animatable = no" means that it cannot be animated with CSS @keyframes.

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property          
empty-cells 1.0 8.0 1.0 1.2 4.0

CSS Syntax

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

Property Values

Value Description Demo
show Display borders on empty cells. This is default
hide Hide borders on empty cells
initial Sets this property to its default value.  
inherit Inherits this property from its parent element.  

Comments