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

1

3 Answers 3

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.

Sign up to request clarification or add additional context in comments.

Comments

3
table { border-collapse: collapse; } 

Comments

0
table {border-spacing: 8px 2px;} td {padding: 6px;} 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.