CSS PROPERTIES
Expand All|Collapse All
CSS AT-RULES
SPONSORED LINKS

CSS empty-cells Property

Topic: CSS3 Properties Reference« Prev|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:

empty-cells show | hide | initial | inherit

The example below shows the empty-cells property in action.

  • 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.

Browsers Icon

Basic Support—

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

Warning:Internet Explorer 7 and earlier versions don't support the empty-cells property. IE8 supports this property, but requires a valid <!DOCTYPE>.


Further Reading

See tutorial on: CSS Tables.

Related properties: table-layout, border-collapse, border-spacing

 
Close

Your Feedback:

 

We would love to hear from you! Please say something.