Style emptyCells attribute
- Previous page display
- Next page filter
- Go up one level HTML DOM Style Object
Definition and usage
emptyCells
Set or return whether the borders and background of empty cells are displayed.
See also:
CSS Tutorial:CSS table
CSS Reference Manual:empty-cells attribute
Instance
Example 1
Change the display of empty cells:
function show() { document.getElementById("myTable").style.emptyCells = "show"; } function hide() { document.getElementById("myTable").style.emptyCells = "hide"; }
Example 2
Return emptyCells attribute:
alert(document.getElementById("myTable").style.emptyCells);
Syntax
Return emptyCells attribute:
object.style.emptyCells
Set emptyCells attribute:
object.style.emptyCells = "show|hide|initial|inherit"
Attribute value
Value | Description |
---|---|
show | Show borders and background in empty cells. Default. |
hide | Hide borders and background in empty cells. |
initial | Set this attribute to its default value. See initial. |
inherit | Inherit this attribute from its parent element. See inherit. |
Technical details
Default value: | show |
---|---|
Return value: | String representing the border and background of empty cells. |
CSS version: | CSS2 |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
- Previous page display
- Next page filter
- Go up one level HTML DOM Style Object