0

I use the display properties table and table-cell to get equal heights on columns.

One way to control spacing between columns is to define border-collapse, but that doesn't allow for control per element-basis, the same spacing between all table-cell elements gets applied.

Is there any sort of trick to achieve the normal margin/padding effect on individual table-cell elements?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Fellow Stranger
  • 32,129
  • 35
  • 168
  • 232

2 Answers2

2

try to add display:block; to child element of the table-cell div...it will work.

radha
  • 782
  • 4
  • 8
-1
<table border="1" cellspacing="10">
<tr>
<td>First</td>
<td>Row</td>
</tr>   
<tr>
<td>Second</td>
<td>Row</td>
</tr>
</table>
Supun Silva
  • 580
  • 5
  • 21