If you don't have borders, or have borders and want the spacing inside the cells, you can use padding
, or line-height
. As far as I know, margin has no effect on cells and rows.
A CSS property for spacing of cells is border-spacing
, but it doesn't work on IE6/7 (so you can use it depending on your crowd).
If all else fails you can use the old cellspacing
attribute in your markup - but this will also give you spacing between the columns. Some CSS reset suggest you should set it anyway to get cross-browser support:
/* tables still need cellspacing="0"
in the markup */