右对齐图像在Outlook 2007,2010和2013上有1px的差距

时间:2014-11-18 08:53:57

标签: html image email outlook

在我的电子邮件中,有一个右对齐图像。问题是,它的右侧并不完全坚持父表格单元格的右边缘,而是存在1px的间隙。这仅发生在Outlook 2007,2010和2013上,而不是发生在其他版本的Outlook和其他电子邮件代理上。

请复制here处的代码并将其发送到Outlook 2007,2010或2013以查看问题。

我尝试了许多解决方案,例如border-collapesmso-table-rspacemso-line-height-rule等,但仍然没有运气。

1 个答案:

答案 0 :(得分:0)

使用图片时,当宽度和高度也添加到图片周围时,电子邮件往往表现得更加一致,请查看包含图片的我的编辑版表格。

<table align="center" width="600" cellpadding="0" cellspacing="0" border="0" bgcolor="ffffff">
<tr>
    <td width="600" align="right" bgcolor="ffffff" style="padding: 50px 0;">
        <table align="right" width="250" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td width="250" height="200" align="right">
                <img style="display: block;" src="http://placehold.it/250x200" width="250" height="200" border="0" alt="">
            </td>
        </tr>
        </table>
    </td>
</tr>
</table>

<td><table>没有固定宽度,但外部<td><table>外部<table><td>时,问题也会出现{1}}可能无法正确继承宽度。

我还没有机会对此进行测试,但如果可以,我会的。