1

I want to create a table, where cellspacing is set to 0. Currently I have the following HTML which works correctly. But I want to put the cellspacing to the CSS, but can't find the correct style for it.

<table class="overviewGrid" id="OrderTable" cellspacing="0px">
</table>

Can anybody help me? Thx in advance

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
BitKFu
  • 3,649
  • 3
  • 28
  • 43
  • 1
    This is a good answer: http://stackoverflow.com/questions/339923/how-to-set-cellpadding-cellspacing-in-css/3209434#3209434 – Mark Bell Oct 10 '10 at 10:18

3 Answers3

4

The CSS equivalent of <table>'s cellspacing attribute is border-spacing. However, Māris Kiseļovs' answer (border-collapse) is the one you should use to remove the cell spacing.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
3
table {
  border-collapse: collapse;
}
Māris Kiseļovs
  • 16,957
  • 5
  • 41
  • 48
0
table {border-spacing: 8px 2px;}
td    {padding: 6px;}
CreativePS
  • 1,105
  • 7
  • 15