Skip to Content
Web Design in a Nutshell, 3rd Edition
book

Web Design in a Nutshell, 3rd Edition

by Jennifer Robbins
February 2006
Intermediate to advanced
826 pages
63h 42m
English
O'Reilly Media, Inc.
Content preview from Web Design in a Nutshell, 3rd Edition

The default value for empty-cells is show, which shows the background and borders for cells that do not contain any content. The hide value hides the cell’s background and borders and is equivalent to visibility: hidden.

For a cell to be “empty,” it may not contain any text or replaced elements, non-breaking spaces ( ) or whitespace. It may contain carriage returns (CR), line feeds (LF), and space characters.

Figure 22-5 shows the previous table border example, this time with empty elements set to hide.

    table {border-collapse: separate;
           border-spacing: 10px 3px;empty-cells: hide;
           border: none;}

    td { border: 1px solid black; }
Empty cells hidden with the empty-cells property

Figure 22-5. Empty cells hidden with the empty-cells property

Tip

The empty-cells property is not supported by Internet Explorer through Version 6. Version 7 promises improved support of CSS 2.1, but as of this writing, support for empty-cells is not specifically documented.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Responsive Web Design with HTML5 and CSS3

Beginning Responsive Web Design with HTML5 and CSS3

Jonathan Fielding

Publisher Resources

ISBN: 0596009879Errata Page