Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


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

CHAPTER 8: Working with Tables > Adjust Cell Padding and Border Spacing

Adjust Cell Padding and Border Spacing

You can use padding to add space between the border and the contents of a cell. Padding can make table content more legible. You can use spacing to increase the distance between cell borders. Increasing the spacing can add emphasis to the borders when you have borders turned on. If you do not define padding and spacing properties, most browsers add 1 pixel of padding and 2 pixels of spacing by default. You can also set padding or spacing settings to 0 to remove them from your tables.

Adjust Cell Padding and Border Spacing

Set Cell Padding

  1. image In your style sheet, type td { } to define a td selector.

Note

To set the padding between the outer border of the table and the cells, you can define a table selector.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial