Tables
empty-cells
empty-cells sets whether the borders and background of empty table cells are drawn.
Syntax
show | hidePreview
| 個数 | |
|---|---|
| りんご | 3 |
| みかん | 5 |
Presets
Drag the bottom-right corner to resize
Code
.box {
border-spacing: 0.25em;
empty-cells: hide;
}Controls
empty-cellshide
| 個数 | |
|---|---|
| りんご | 3 |
| みかん | 5 |
About
Values
show: draws borders and backgrounds on empty cells too. This is the initial value.hide: draws no borders or backgrounds on empty cells.
Things to watch
- It has no effect with
border-collapse: collapse, because borders are merged with the neighboring cells. - An empty cell has no content at all, or only white space that
white-spacehandling removes. is not removed, so a cell holding only that is not empty. - It is inherited, so writing it on the
tableelement applies it to every cell.
The preview leaves the top-left cell of the table inside the box empty and lets the table take the value written on the box. A supporting declaration spaces the cells apart, so hide removes only the top-left frame.