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
  • 665,005
  • 155
  • 1,345
  • 1,328
BitKFu
  • 3,512
  • 3
  • 25
  • 42
  • 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
  • 665,005
  • 155
  • 1,345
  • 1,328
3
table {
  border-collapse: collapse;
}
Māris Kiseļovs
  • 16,389
  • 5
  • 39
  • 48
0
table {border-spacing: 8px 2px;}
td    {padding: 6px;}
CreativePS
  • 1,107
  • 7
  • 15