开发者

How to define cellspacing in CSS

开发者 https://www.devze.com 2023-01-19 04:43 出处:网络
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 ce开发者_开发知识库llspacing to the CSS, but can\'t find the c

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 ce开发者_开发知识库llspacing 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


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.


table {
  border-collapse: collapse;
}


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

精彩评论

暂无评论...
验证码 换一张
取 消