O'Reilly logo

Cascading Style Sheets: Designing for the Web, Third Edition by Bert Bos, Håkon Wium Lie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 17. Tables

Tables visually show relations between pieces of data. Lists do the same, but tables allow you to show multiple relations at the same time. Each cell in a table holds a number or some short text that has some relation to other data in the same column or the same row.

To make it easier to see the structure of the table, rules (i.e., lines) are often added between the rows or columns (or both), sometimes only between certain groups of rows or columns. Colors and changes in font can, of course, also be used. Cells don’t have margins (although there is a cell-spacing property that works in a somewhat similar way), but padding is available.

CSS2 offers two ways of setting borders on cells. In one model, called collapsing borders ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required