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, there is only one border between two cells; in the other, called separate borders, there are two. Depending on what "look" you are trying to achieve, and on personal preference, you may find one or the other easier to use.



Cascading Style Sheets(c) Designing for the Web
Cascading Style Sheets: Designing for the Web (3rd Edition)
ISBN: 0321193121
EAN: 2147483647
Year: 2003
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net