发送大量电子邮件,几乎整个事情都在表格内。
影响表格的 CSS:
.title {
vertical-align: top;
}
HTML:
<table width="580" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="title" align="left" width="440" valign="top">
<h2><singleline label="Title">Enter your title</singleline></h2>
<p><multiline label="Description">Description</multiline></p>
</td>
<td align="left" valign="top" width="20"><img src="/images/00.gif" height="1" width="20" border="0"></td>
<td align="left" valign="top" width="120"><img src="/images/001.jpg" editable="true" label="Image" width="120" border="0"></td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" width="580"><img src="/images/00.gif" height="20" width="1" border="0"></td>
</tr>
</table>
我需要标签内的文本与表格顶部齐平。目前 /images/001/jpg 是齐平的,但文本在表格边缘下方 5 个像素处。
我在CSS中使用vertical-align:top,尝试过border-spacing:none,border-collapse:collapse和border:none。他们都没有解决问题。
使用边距顶部:-5px;在标签上解决了标准浏览器测试中的问题,但某些电子邮件客户端不支持。