• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 14. Tables > Controlling the Space

Controlling the Space

(X)HTML has long had two attributes for the table tag that allow it to control spacing between the contents of a cell and its border (cellpadding) and between one border and the next (cellspacing). And while they’re well supported and perfectly reasonable, they’re not very flexible. You can’t, for example, affect the cell spacing on a single side, or add cell padding just to a few cells in a table.

CSS on the other hand lets you use the now familiar padding property (see page 188) to control space on every side of a cell, as well as between paragraphs and other elements. It is a welcome substitute for cellpadding.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint