English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
empty-The cells CSS attribute shows or hides the border and background of table cells without visible content. Non-breaking spaces ( ) are considered visible content.
The following table explains the usage and version history of this attribute, as well as its syntax in the JavaScript script.
Default value: | show |
---|---|
Applies to: | Table cell element |
Inheritance: | Yes |
Animatable: | No.See Animation attribute. |
Version: | CSS 2,3 |
JavaScript syntax: | object.style.emptyCells="hide" |
The syntax of this attribute is as follows:
empty-cells: show | hide | initial | inherit
The following examples demonstrate how to use empty-cells attribute.
table { empty-cells: show; }Test and see‹/›
The following table describes the value of this attribute.
Value | Description |
---|---|
show | Draw a border and background around empty cells like normal cells. This is the default value. |
hide | There is no border or background around empty cells. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated element uses its parent element's empty-The value of the cells attribute. |
empty-Browser compatibility of the cells attribute, the numbers in the following table represent the minimum version number of the browser that supports this attribute; all mainstream browsers support this attribute.
|
Warning: Internet Explorer 7and earlier versions do not support the empty-cells attribute. IE8Supports this attribute, but requires an effective<!DOCTYPE>.
See tutorial:CSS Tables.
Related attributes:table-layout,border-collapse,border-spacing