Dreamweaver Tables - spacing and padding

If you do not want any spacing or padding,
put a zero in the relevant fields.
Otherwise Dreamweaver uses default values of
2 pixels for cell spacing and 1 pixel for cell padding.

Nothing is written to the html however -
your user's browser may use other values
which will change what they see...

This applies to the border value too -
the default value is 1 pixel.
Set this to 0 to make the border and
lines between cells in your table disappear.

Jamie,
7th birthday at Legoland Pirate Falls
cell space 20, border 5  
Spacing is the gap between cells in a table. Note that with a value of 20 for cell spacing I have used up 20 pixels on each side of the table, plus 20 between the two cells, adding up to 60 pixels of my table. This text touches the edges of the cell.

Jamie, soaked after the Legoland Pirate Falls
cell padding 20, border 5  

Padding is the area around the inside of each cell which protects the image or words from touching the borders or the contents of the next cell. Note that with a value of 20 for cell padding I have used up 20 pixels on the inside of each cell on each side, 40 pixels per cell, so with two cells across that is 80 pixels of my table.

If the table contained more cells, then the difference between using spacing or padding would be further accentuated. In practice you use a padding value of half what you want as a 'gutter' between columns of text since each cell provides half of the final total seen in the browser.

The two tables are identical
except for the values used for cell space/cell pad.

The first table's background colour of red
is overwhelming when seen with cell spacing 20 pixels,
but not seen at all when the spacing value is zero -
since the padding is within the cells
and so uses their individual colours.

click for Printer friendly version! (close after use)