我遇到过这个问题,但还没有找到解决方案。对于html电子邮件,我发现在某些Outlook程序中,它会使单元格折叠。例如,2007/2010:
<tr>
<td width="10"><img></td>
<td width="80">Copy</td>
<td width="10"><img></td>
</tr>发生的情况是Outlook忽略中间列的单元格的宽度。如果我使用CSS作为宽度,也没关系。
<tr>
<td style="width:10px;"><img></td>
<td style="width:80px;">Copy</td>
<td style="width:10px;"><img></td>
</tr>这具有相同的结果。
我还没弄清楚的是,Outlook中的设置导致了单元格宽度的折叠。通常,这种情况只会发生在我们公司的首席执行官的Outlook中。我不再以这种方式编写带有副本的单元格,因为我有一种更可靠的工作方式,但有时营销部门认为他们知道自己在做什么,并更改我的代码,认为它会工作,当我知道它不会在首席执行官的电脑上的Outlook。
有人知道Outlook中的什么设置导致了这种情况吗?我喜欢在我的电脑上有这个设置,所以我不需要,但首席执行官来测试它。
发布于 2011-06-18 04:39:22
你能提供一个更广泛的代码示例,包括整个表而不只是一行吗?将有助于给出为什么会发生这种情况的线索。
无论如何,在Outlook中,对我有效的方法是在表格中添加第一行,强制将列的宽度调整为精确的高度。一个1x1的透明GIF,除了表格单元格宽度之外还设置了宽度,似乎是一种甚至Outlook都会监听的“暴力”方法:
<table>
<tr>
<td width="10" height="1"><img width="10" height="1" /></td>
<td width="80" height="1"><img width="80" height="1" /></td>
<td width="10" height="1"><img width="10" height="1" /></td>
</tr>然后下面的行与顶行的列宽一致。
发布于 2015-03-18 06:31:45
我在Outlook 2013 for Windows中遇到了这个问题。它在Outlook for Mac (和Gmail,以及几乎所有其他现代电子邮件客户端)上运行得很好,但在Outlook 2013 for Windows中,它会完全崩溃。
解决方案很简单:如果要声明像素宽度(内联样式除外),请不要放入px。你必须是非常守旧的人。以下是我的最终(工作)代码:
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="1" align="left" valign="top" bgcolor="#ffffff"><img src="#"></td>
<td width="150" align="center" bgcolor="#ffffff"><span style="font-size: 11px; font-family: Arial, Helvetica, sans-serif; font-weight: lighter;"><a style="color: #5f6062; text-decoration: none;" href="#">SECTION 1</a></span></td>
<td width="150" align="center" bgcolor="#ffffff"><span style="font-size: 11px; font-family: Arial, Helvetica, sans-serif; font-weight: lighter;"><a style="color: #5f6062; text-decoration: none; text-decoration: none;" href="#">SECTION 2</a></span></td>
<td width="150" align="center" bgcolor="#ffffff"><span style="font-size: 11px; font-family: Arial, Helvetica, sans-serif; font-weight: lighter;"><a style="color: #5f6062; text-decoration: none;" href="#">SECTION 3</a></span></td>
<td width="149" align="center" bgcolor="#ffffff"><span style="font-size: 11px; font-family: Arial, Helvetica, sans-serif; font-weight: lighter;"><a style="color: #5f6062; text-decoration: none;" href="#">SECTION 4</a></span></td>
</tr>
</table>https://stackoverflow.com/questions/6389842
复制相似问题