【问题标题】:Outlook 2013 only image gap in HTML emailOutlook 2013 仅 HTML 电子邮件中的图像间隙
【发布时间】:2026-02-23 16:35:01
【问题描述】:

我的 HTML 电子邮件仅在 Outlook 2013 中出现问题,在以前的版本(包括 2007 和 2010)中看起来不错。

我添加了 style="display:block; 我的桌子和 td 有黑色背景色。 我尝试在 td 和 img 上指定宽度和高度 以及包含 td 的上一篇文章中建议的行高样式。

代码如下:

<table width="200" cellpadding="0" cellspacing="0" align="right" bgcolor="#000000"><tr><td width="156" height="158" style="background-color:#000000; line-height:13px;"><img src="http://identifix.skmgroupwork.com/email/iden074/images/JerryGTruglia.jpg" width="156" height="158" align="right" alt="Jerry G Truglia" style="padding: 0px 20px 0px 0px; width: 156px; height: 158px;display:block;"></td></tr></table>

包含代码:

<table width="510" align="center" cellpadding="0" cellspacing="0" style="" bgcolor="#000000">
            <tbody>
                <tr>
                    <td colspan="2" align="left" valign="top" style="font-family: Arial, Helvetica, sans-serif; color: #ffffff; font-size: 12px; line-height: 20px; padding: 0px 30px 0px 40px; ">
                    <table width="180" cellpadding="0" cellspacing="0" align="right" bgcolor="#000000"><tr><td width="156" height="168" style="background-color:#000000; line-height:13px;"><img src="http://identifix.skmgroupwork.com/email/iden074/images/JerryGTruglia.jpg" width="156" height="158" align="right" alt="Jerry G Truglia" style="padding: 0px 0px 0px 0px; width: 156px; height: 158px;display:block;"></td></tr></table><span style="color:#feae38;font-size:16px;"><b>Don’t Miss Your Chance to Catch<br>Identifix&rsquo;s Live Training, <span class="appleLinksWhite">3/12.</span></b></span><br><br>Seats are filling up quickly, so be sure to RSVP today for &ldquo;Find and Fix Faster – Your Path to More Profits,&rdquo; Identifix&rsquo;s live training event. Held <span class="appleLinksWhite" style="color: #ffffff;">on Tuesday, March 12th,</span> the session will be conducted by nationally recognized automotive industry expert, Jerry &ldquo;G&rdquo; Truglia, president of Automotive Technician Training Services (ATTS).<br><br>
                    <span style="color:#feae38;font-size:14px;"><b>Learn how your shop can:</b></span><br><br>
                    <img style="display:inline;" src="http://identifix.skmgroupwork.com/email/iden074/images/bulletSM.jpg"><span style="font-family: Arial, Helvetica, sans-serif;color:#feae38;font-size:13px;"><b>&nbsp;Diagnose and repair vehicles faster</b></span><br>
                    <img style="display:inline;" src="http://identifix.skmgroupwork.com/email/iden074/images/bulletSM.jpg"><span style="font-family: Arial, Helvetica, sans-serif;color:#feae38;font-size:13px;"><b>&nbsp;Reduce non-billable work time</b></span><br>
                    <img style="display:inline;" src="http://identifix.skmgroupwork.com/email/iden074/images/bulletSM.jpg"><span style="font-family: Arial, Helvetica, sans-serif;color:#feae38;font-size:13px;"><b>&nbsp;Boost customer trust and satisfaction</b></span><br>
                    <img style="display:inline;" src="http://identifix.skmgroupwork.com/email/iden074/images/bulletSM.jpg"><span style="font-family: Arial, Helvetica, sans-serif;color:#feae38;font-size:13px;"><b>&nbsp;Increase tech confidence and productivity</b></span><br>
                    <img style="display:inline;" src="http://identifix.skmgroupwork.com/email/iden074/images/bulletSM.jpg"><span style="font-family: Arial, Helvetica, sans-serif;color:#feae38;font-size:13px;"><b>&nbsp;Stay profitable</b></span><br><br>
                    Join us <span class="appleLinksWhite" style="color: #ffffff;">from 7:30 &ndash; 9:00 p.m.</span> at <a style="color:#feae38;" target="_blank" href="https://plus.google.com/104076111016352099629/about?gl=us&hl=en">ATTS</a>, <span class="appleLinksWhite" style="color: #ffffff;">10 Lupi Plaza, Mahopac, NY 10541</span>. Pizza and soft drink will be provided, followed by a hands-on demonstration of Identifix’s award-winning online tool, Direct-Hit<sup>&reg;</sup>.<br>
                    <br><strong><span style="color:#feae38;font-size:16px;"><b>Reserve your seat before it’s too late!<br>Call <span class="appleLinksWhite" style="color: #ffffff;">1.855.270.5855</span> now to RSVP.<span style="color:#feae38;"><b></strong><br><br></td>
                </tr>
                <tr>
                    <td align="left" valign="top" colspan="2" style="padding: 14px 0px; "><img src="http://identifix.skmgroupwork.com/email/iden045/images/iden045-divider.gif" width="550" height="1" alt="" border="0" style="background-color: #ffffff; width: 570px; height: 1px; display: block; "></td>
                </tr>
                <tr>
                    <td colspan="2" align="left" valign="top" style="font-family: Arial, Helvetica, sans-serif; color: #ffffff; font-size: 11px; line-height: 16px; padding: 14px 0px 24px 40px;">
                    &#169;2013 Identifix | <span class="appleLinksWhite" style="color: #ffffff;">2714 Patton Road | Roseville, MN 55113</span> | <span class="appleLinksWhite" style="color: #ffffff;">1.800.745.9649</span></td>
                </tr>
            </tbody>
        </table>

任何建议表示赞赏。谢谢,

Douglas,我尝试添加一张图片,但它说我需要至少 10 个声望才能发布它,而我现在只有 1 个。它的链接是这个http://identifix.skmgroupwork.com/email/iden074/images/snip.JPG

在仅在 Outlook 2013 上进行的石蕊测试中,出现了一个奇怪的白色,甚至没有对齐的间隙,出现在不应该存在的图像右侧。

【问题讨论】:

  • 似乎是什么问题?它应该做什么/看起来不正确?可以发个截图吗?
  • 完整的源代码,包括 HTML 文档类型,会很有帮助。例如,如果它太长而无法添加到上面的答案中,可以将其粘贴到 JSFiddle 演示中。
  • 我也遇到了同样的问题,请问您解决了吗?

标签: html image email outlook-2013


【解决方案1】:

以下对我有用:

<td style="line-height:0px; mso-line-height-rule:exactly;">

【讨论】:

    【解决方案2】:

    您应该尽量不要使用 colspan 使其在所有客户端(如 lotus notes 6.5 和 7)中工作

    【讨论】:

    • 我没有测试 Lotus Notes 6.5 和 7。我只是关心 Outlook 2013 中的问题。
    【解决方案3】:

    此问题是否特定于 Microsoft 电子邮件客户端? 电子邮件在 Web 客户端上的外观如何?

    我在 2013 年,有时是 2007 年遇到了各种各样的问题。这些问题通常可以通过使用秘密的 mso 特定 css 规则来解决。

    例如;使用 mso-line-height-rule:完全正确; inline css 将解决 Outlook 2013 将所有 tds

    如果不查看代码的其余部分,很难在代码中隔离问题。

    【讨论】:

    • 问题是特定于 Microsoft Outlook 2013。电子邮件在 Web 客户端中看起来不错,我假设您指的是 Outlook.com,在 chrome 和 IE 中。其他 Web 客户端,如 yahoo、hotmail 和 gmail,看起来也都不错。您在 img 或 td 上使用 mso 规则吗?如果有帮助,我会试一试并添加更多包含代码。
    • 将此样式添加到 td 解决了我的问题。 ... 如果没有 line-height 样式,它也将无法工作。感谢four33 的回答和Terri 的问题,您为我节省了很多时间。
    • 很高兴认识迈克尔。谢谢