In CSS, the attribute of empty-cells specifies whether to display the borders and background of empty cells in the table. This article introduces in detail the definition and usage of empty-cells, the syntax of empty-cells, and examples of empty-cells.
The role of the empty-cells attribute in CSS is to specify whether to display the borders and backgrounds of empty cells in the table.
empty-cells property example
Hide the borders and backgrounds on empty cells in the table:
table { border-collapse:separate; empty-cells:hide; }
empty-cells definition and usage
empty-cells Property sets whether to display empty cells in the table (only for "detached border" mode).
Note: Some versions of IE browsers do not support this attribute.
Description
This property defines how table cells that do not contain any content are represented. If displayed, the cell's borders and background are drawn. This property is ignored unless border-collapse is set to separate.
Syntax:
empty-cells : hide | show
Parameters:
hide: Hide
show: Show
Description:
Set or retrieve whether to display the border of the cell when the table cell has no content.
This property only works when the table border is independent (for example, when the border-collapse property is equal to separate).
Currently IE5.5 does not support this attribute.
The corresponding script feature is emptyCells. Please see other books I have written.
Example:
table { caption-side: top; width: auto; border-collapse: separate; empty-cells: hide; }
The above is the detailed content of CSS: Detailed explanation of the use of empty-cells for definition. For more information, please follow other related articles on the PHP Chinese website!