td在gmail表中的空白区域
问题描述:
我有一个表格,我把它作为html发送到gmail上,但是它里面有白色的空白。这是由于gmail,我想。两个td之间有空白区域。 如何移除它?td在gmail表中的空白区域
我的代码是:
<table>
<tr class="empty"><td></td></tr>
<tr class="empty"><td></td></tr>
<tr>
<td colspan="4" style="background-color: #007C66 !important; color:white !important;">
Company:
</td>
<td colspan="4" style="background-color: #007C66 !important; color:white !important;">
Employee:
</td>
</tr>
//other code
</table>
答
没有在表中默认的单元格间距。在表中设置cellspacing="0"
。
<table cellspacing="0">
<tr class="empty"><td></td></tr>
<tr class="empty"><td></td></tr>
<tr>
<td colspan="4" style="background-color: #007C66 !important; color:white !important;">
Company:
</td>
<td colspan="4" style="background-color: #007C66 !important; color:white !important;">
Employee:
</td>
</tr>//other code
</table>
这里是DEMO
谢谢,我会用它! :) –