{empty-cells:} Empty-Cells Property - CSS Property Reference :: webDev

EMPTY-CELLS IS A TABLE PROPERTY

{empty-cells:}

The {empty-cells:} property controls the rendering of the {border:}s and {background:}s of cells that have no visible content in a <table> that’s using the separated borders model. If the collapsing borders model is used, the {border-spacing:} property is ignored.

The {empty-cells:} property applies only to elements whose {display:} property has the value {display:table-cell}, but since it’s inherited, it can also be set on the whole table, a row group, or a row.

A cell is considered to have no visible content if any of the following cases apply:

  • It has no content at all.
  • It contains only carriage returns, line feeds, tab characters, or blank spaces.
  • Its {visibility:} property is set to {visibility:hidden;}.

A non-breaking space is considered to be visible content.

Internet Explorer for Windows versions up to and including 7 don’t support the {empty-cells:} property, and will behave as if all tables had {empty-cells:} set to {empty-cells:hide;}.

Firefox versions up to and including 2 don’t hide the row if all the cells have {empty-cells:hide;} and none of them have any visible content.

Opera versions up to and including 9.5 won’t hide the row, and will display cell backgrounds, if {empty-cells:hide;} is applied to all the cells, and none of them have any visible content.