jal*_*rin 4 html html-email html-rendering outlook-2013
在开发html电子邮件新闻通讯时,我经常使用类似于以下内容的结构:
<table width="244" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffcc">
<tr>
<td>
<table border="0" align="left">
<tbody>
<tr>
<td bgcolor="#FFCCCC">text in the table cell.<br>and another line of text.<br>and a third line.</td>
</tr>
</tbody>
</table>
Hello. This is sample text. This is another sentence. Hello. This is sample text. This is another sentence. Hello. This is sample text. This is another sentence.</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
在浏览器中查看时,结果如下所示:

但是当由Outlook 2013呈现时,主(黄色)表中最左边的文本被切除:

是否有解释或解决方法?
(我通常将图像而不是文本放在内部(粉红色)表中。这样可以进行设计,使主要(黄色)文本似乎在图像周围流动。无论图像还是文本,结果都是相同的。如此处所示,主(黄色)表中的文本被截断了。)
小智 5
尝试在标题表上设置左对齐,在我的代码中,这将在所有客户端中都有效。对所有客户进行了石蕊测试:
<table cellspacing="0" cellpadding="0" width="560" align="left" border="0">
<tbody>
<tr>
<td align="left">
<table cellspacing="0" cellpadding="0" align="left">
<tbody>
<tr>
<!-- spacer for the top of the image -->
<td align="left" colspan="2">
<img src="spacer.gif" height="5" alt="spacer" style="display:block; margin:0px; border:0px;" align="left" />
</td>
</tr>
<tr>
<!-- the image or text -->
<td align="left">
<img src="imagesrc" alt="imagealt" style="display:block; margin:0px; border:0px;" />
</td>
<!-- spacer for the right of the image -->
<td align="left">
<img src="spacer.gif" width="11" alt="spacer" style="display:block; margin:0px; border:0px;" />
</td>
</tr>
<tr>
<!-- spacer for the bottom of the image -->
<td colspan="2" align="left">
<img src="spacer.gif" height="11" alt="spacer" style="display:block; margin:0px; border:0px;" />
</td>
</tr>
</tbody>
</table>
<!-- here your tekst -->
<div style="margin:0px; padding:0px; mso-line-height-rule: exactly; color:#000000; font-family:Verdana, Arial; font-size:12px; line-height:20px; display:block;">Hello. This is sample text. This is another sentence. Hello. This is sample text.</div>
</td>
</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)