gpt4 book ai didi

html - Outlook 2013 呈现问题 : nested table truncating adjacent text

转载 作者:搜寻专家 更新时间:2023-10-31 08:34:17 26 4
gpt4 key购买 nike

在开发 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>

在浏览器中查看时,结果如下所示:

viewed in a browser

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

rendered by Outlook 2013

对此有解释或解决方法吗?

(我通常会在内部(粉红色)表格中放置图像而不是文本。这允许设计中主要(黄色)文本似乎围绕图像流动。无论是图像还是文本,结果都是相同。主(黄色)表格中的文本被截断,如此处所示。)

最佳答案

尝试在标题表上设置左对齐,在我的代码中这将适用于所有客户端。为所有客户在石蕊试纸中测试:

<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>

关于html - Outlook 2013 呈现问题 : nested table truncating adjacent text,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15561711/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com