由于某些原因,我无法使任何表格单元格之间产生间距。 我想让表格单元格具有灰色背景颜色(在白色页面背景上),以便它们看起来像带有白色间隔的瓷砖。
我尝试在HTML中:
<table cellspacing="3">
在 CSS 中,同样也需要进行相关操作。
table td {
margin:3px;
}
什么都不起作用,单元格仍像一个大灰色的块一样粘在一起。我是不是漏掉了非常基本的东西?
这是实际代码:
<table width="100%" cellspacing="3">
<tr>
<th>Document Number</th>
<th>BP Reference No.</th>
<th>Posting Date</th>
<th>Posting Week</th>
<th>Customer/Vendor Code</th>
<th>Customer/Vendor Name</th>
<th>Item No.</th>
<th>Item/Service Description</th>
<th>Item Group</th>
<th>Warehouse Code</th>
<th>Remaining Open Quantity</th>
<th>Line No.</th>
<th>Sales Employee Name</th>
<th>Stock</th>
<th>Fill Rate</th>
<th>1046</th>
<th>1047</th>
<th>1048</th>
<th>1049</th>
<th>1050</th>
<th>1051</th>
<th>1052</th>
<th>1053</th>
<th>1054</th>
<th></th>
</tr>
<tr>
<td>17272</td>
<td>2244100</td>
<td>5/24/2010</td>
<td>22</td>
<td>NYST</td>
<td>NYSTROM INC.</td>
<td>NYM118SX26DSTKS01</td>
<td>Nystrom, Mort. 1-1/8'', Schl C~K, US26D, ST cam, 5pin, KS #43758</td>
<td>Mort Cylinders</td>
<td>US1</td>
<td>1000</td>
<td>3</td>
<td>KRE Management 1</td>
<td>0</td>
<td>100</td>
<td>1000</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td></td>
</tr>
</table>