需要解决 Outlook 2007 HTML 电子邮件呈现错误(水平间隙)

发布于 2024-08-25 00:47:55 字数 279 浏览 5 评论 0原文

我的 HTML 电子邮件通讯设计在 Outlook 2007 中无法正确呈现。底部有一个白色的水平间隙,破坏了边框和背景。我以前也遇到过这种情况,但不知道如何解决。有什么建议吗?我已在此处发布了源代码。除 Outlook 2007 (Word 2007) 外,它的渲染效果都很好。

顺便说一句,您可以通过使用 Word 2007 打开源代码,在没有 Outlook 的情况下预览问题。

My HTML email newsletter design doesn't render properly in Outlook 2007. There is a white horizontal gap towards the bottom which breaks borders and backgrounds. I've had this happen before and have no idea how to work around it. Any suggestions? I've posted the source here. It renders just fine except in Outlook 2007 (Word 2007).

By the way, you can preview the problem without Outlook, by opening the source with Word 2007.

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

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

发布评论

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

评论(6

辞取 2024-09-01 00:47:56

我的经验是,当 Outlook 2007 插入的换行符附近有图像时,通常会出现这种白换行符。快速解决方法是在图像下方插入一些文本,这样多余的文本将在没有 Outlook 2007 的任何“帮助”的情况下格式化页面,而不是让 Outlook 2007 插入分页符,从而神秘的白线消失。

My experience is that this white line break normally occurs when there is an image close to the line breaks that outlook 2007 inserts. The quick workaround is to insert some text beneath the image so that instead of letting outlook 2007 insert the page break, the extra text will format the pages without any "help" from outlook 2007 hence the disappearance of the mysterious white line.

七分※倦醒 2024-09-01 00:47:55

我看不到原始来源,但解决方法是在设计中的某处插入一个 100% 宽度的表格,就在它损坏的地方上方。这可以是一条 1 像素高的透明线。这允许 Outlook 插入分页符。

Outlook 使用Word 2007 的渲染引擎,因此如果它到达打印尺寸的A4 纸的末尾,则必须在某处插入分页符。如果在本来要插入分页符的位置有一个图像,它只会将该图像强制向下一页 - 这就是您所看到的空间。

使用 100% 表允许 Outlook 在其中插入分页符。

I can't see the original source, but the workaround is to insert a 100% width table somewhere in the design just above where it's breaking. This can be a 1px high transparent line. This allows Outlook to insert a page break.

Outlook is using Word 2007's rendering engine, so if it reaches the end of a sheet of A4 in printing size, it has to insert a page break somewhere. If there's an image in the place where it would otherwise insert that page break, it will just force that image down to the next page - that's the space you are seeing.

Using the 100% table allows Outlook to insert the page break there instead.

萌吟 2024-09-01 00:47:55

以下是对导致该错误的原因以及如何修复该错误的详细解释:
http://www.emailonacid.com/blog/details/C13/horizo​​ntal_spacing_issues_in_outlook_2007_and_2010

Here is a good explaination of what can cause that bug and how you may be able to fix it:
http://www.emailonacid.com/blog/details/C13/horizontal_spacing_issues_in_outlook_2007_and_2010

终弃我 2024-09-01 00:47:55

微软以他们无限的智慧使用Word来呈现HTML?所以我让 Microsoft 为我编写 HTML。

  • 将电子邮件发布为网页
  • 将网页复制到 Outlook 电子邮件中
  • ​​将电子邮件发送给您自己
  • 获取您从自己那里收到的电子邮件的源代码

HTML 现在可以正常工作了。

甚至不用费心去破译 Microsoft 创建的 HTML。我会让你头疼的。

接下来,我必须将 HTML 复制回 Dreamweaver 来修复一些问题:

  • img src= 背景颜色全部搞砸了,
  • 您可以在发送的 Outlook 电子邮件或 HTML 中修复

顺便说一句,我发现如果我尝试把图像映射超链接放回去,问题又出现了。所以我只是链接了整个图像。

Microsoft, in their infinite wisdom uses Word to render HTML? So I let Microsoft write the HTML for me.

  • Publish email as a web page
  • Copy web page into an Outlook email
  • Send the email to yourself
  • Get the source code of the email you receive from yourself

That HTML will now work fine.

Don't even bother to decipher the HTML Microsoft creates. I'll give you a headache.

Next, I had to copy the HTML back into Dreamweaver to fix a few things:

  • img src= was all screwed up
  • background color you can fix in the Outlook email you send, or in the HTML

By the way, I found if I tried at put the image map hyperlinks back in, the problem resurfaced. So I just linked the whole image.

┊风居住的梦幻卍 2024-09-01 00:47:55

我目前遇到完全相同的问题,据我所知,这与
Outlook 2007 使用Word 2007 作为渲染引擎。因此,Outlook 2007 在整个电子邮件中(以一定的间隔)放置(实际上是)分页符。

我可能完全错了,但这就是我的看法......

任何答案都会很好!

I currently have exactly the same problem, as far as i'm aware this is something to do with
Outlook 2007 using Word 2007 as a rendering engine. Because of this, Outlook 2007 puts (what are effectively) page breaks throughout your email (at certain intervals).

I may be completely wrong, but this is how I see it...

Any answers would be rather good!

起风了 2024-09-01 00:47:55

答案似乎是这些错误与电子邮件的大小/长度有关并且无法消除,尽管有时可以通过编辑内容以添加额外的水平间距或增加行高属性来减轻影响中断之前的一些文本。

The answer seems to be that these bugs are related to the size/length of the email and can't be eliminated, though sometimes the effect can be mitigated by editing the content to add additional horizontal spacing or by increasing the line-height attribute of some of the text that precedes the breaks.

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