MS Outlook 2007
问题

发布于 2024-10-22 10:48:08 字数 972 浏览 4 评论 0原文

我为客户制作了一个 HTMLemailer。电子邮件发送者有一些换行符。在其他客户端上它看起来很完美,直到我遇到 MS Outlook 2007。Outlook 似乎无法识别
以及

内设置的宽度。有解决办法吗?提前致谢。

<table width="602px" cellpadding="0" cellspacing="0" border="0" align="center">
    <tr>
        <td colspan="3">
            <p align="center" style="font-family: arial; font-size: 11px; color: #000000;">If you are unable to read the contents of this email, please <b><a href="#" style="color:#000000; text-decoration:none;">click here</a></b> to view the online version.</p>
            <br>
         </td>
    </tr>
    <tr>
        <td colspan="3"><a href="#"><img src="#" width="602" height="161" alt="#"></a></td>
    </tr>
    <tr>
        <td colspan="3" style="border-top:2px black solid;"><br><br></td>
    </tr>

I've made a HTMLemailer for a client. The emailer has a few line breaks with it. On other clients it looks perfect, until i come across MS Outlook 2007. Outlook doesnt seem to recognize the <br> and the width that iset inside a <div>. Is there a fix for this? Thanks in advance.

<table width="602px" cellpadding="0" cellspacing="0" border="0" align="center">
    <tr>
        <td colspan="3">
            <p align="center" style="font-family: arial; font-size: 11px; color: #000000;">If you are unable to read the contents of this email, please <b><a href="#" style="color:#000000; text-decoration:none;">click here</a></b> to view the online version.</p>
            <br>
         </td>
    </tr>
    <tr>
        <td colspan="3"><a href="#"><img src="#" width="602" height="161" alt="#"></a></td>
    </tr>
    <tr>
        <td colspan="3" style="border-top:2px black solid;"><br><br></td>
    </tr>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

沫尐诺 2024-10-29 10:48:08

Outlook 对于大多数 HTML 电子邮件来说都是一种痛苦。您可以尝试自行关闭 br 标签
,并可能将其放入段落元素内,但我怀疑它能否使其自行工作。我尝试的其他事情是添加一个无中断空格   字符以强制某种布局进入 td 单元格,或者甚至采用正确的老式方法并插入一个白色填充图像高度设置为您需要的任何高度。

Outlook is a pain for most things HTML email. You could try self closing the br tag <br />, and maybe putting it inside the paragraph element, but I doubt it'll get it working on its own. Other things I'd try are to add a none breaking space   character to force some kind of layout into the td cell, or even going proper old-school and inserting a white padding image with the height set to whatever you need.

卷耳 2024-10-29 10:48:08

将评论转换为答案,因为这刚刚引起我的注意:

据我所知,如果没有其他内容需要破坏,则
将被忽略。也许尝试在换行符后添加   并查看结果是否是您所期望的? (另外,我对 Outlook 的渲染不太有信心,因为它使用 MS Office 的引擎而不是 IE)。

Converting comment to answer, as this was just brought to my attention:

To my knowledge, a <br /> is ignored if there is no additional content to break. Maybe try adding a   after your line-breaks and see if the result is what you're expecting? (Plus, I don't hold much faith to Outlook's rendering as it uses MS Office's engine instead of IE).

浅唱ヾ落雨殇 2024-10-29 10:48:08
<br> 

把 2 行代替 1 行。

所以我制作了一个名为“br”的组件

<table><tr><td> </table></tr></td

,适用于所有电子邮件客户端

<br> 

Put 2 lines instead 1.

So I made a component called "br"

<table><tr><td> </table></tr></td

Works in all email clients

锦欢 2024-10-29 10:48:08

问题来自于在新行中声明
。 Outlook 会自动添加一个新行以及 br。尝试将它们放在与前面的代码相同的行中。

The problem comes from declaring <br> in a new line. Outlook automatically adds a new line plus the br. Try putting them in the same line as the previous code.

凡尘雨 2024-10-29 10:48:08

除了已经提出的建议之外,我还建议使用一些目前可用的 HTML 新闻通讯创建器;

我从我的公司 Publicate 了解到,我们花费了大量时间测试和优化 HTML,以便它可以在 Outlook 中正确导出和呈现。

我们在 Acid 上使用电子邮件作为测试过程的一部分,这可能对您也有帮助,或者如果您想编写自己的代码,也可以查看 Litmus。

Aside from the suggestions already made, I would recommend using some of the HTML newsletter creators that are available these days;

I know from my company Publicate, we spend a large amount of time testing and optimising the HTML so that it can be exported and renders correctly in Outlook.

We use Email on Acid as part of the testing process, which might be helpful to you too, or also check out Litmus if you are wanting to code your own.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文