为什么在 Firefox、Internet Explorer、Chrome Web 浏览器中我的电子邮件模板显示正确对齐,但在 Microsoft Outlook 电子邮件阅读器中却出现问题?
我有一个用于发送电子邮件的模板,该模板是用 css 纯手工编写的,然后我在 Firefox/InternetExplorer/Chrome 浏览器中进行了测试。但是当我将该电子邮件发送给我老板的电脑时,因为他始终是 Microsoft Outlook 用户。
他总是让对齐被破坏,文本被破坏,所有问题都开始了。我的问题是你到底如何写作?没有一个网络浏览器显示我的模板错误。
我搜索了很多,但大多数答案都没有对此进行深入和正确的回答。我非常感谢一些专家对此的意见。
谢谢
I have a template which i used for sending emails written purely in hand made with css, and then i tested in Firefox/InternetExplorer/Chrome browser. But when i send that email to My boss PC as he is always Microsoft outlook user.
He always gets the alignment broken, texts broken all problems start. My question is how do you really write then? None of the web browser showing my template wrong.
I searched a lot, but most answers are not deeply and correctly well answered about this. I would really appreciate some experts input on this.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Outlook 使用旧版本的 Trident(CSS 渲染引擎)。根据您老板使用的 Outlook 类型,情况可能会变得更糟。 Outlook 2010 实际上恢复到了旧版本的 Trident,因为微软在欧盟的反垄断诉讼中败诉,因此无论 2010 年之前的版本实际上都呈现得更好,但它们都相当低于标准。
你会想要停止使用现代 html/css 进行开发,而转向老式的表格布局。我知道,这很恶心,但你必须为电子邮件这样做。
最好的测试是原生的,但如果您无法访问这两个版本(不是很多),您应该查看 EmailOnAcid.com,他们提供了大量可以测试的电子邮件客户端。
如果您需要任何其他服务,constantcontact.com、mailchimp.com 和 Campaignmonitor.com 都提供的不仅仅是测试服务。
outlook uses an older version of Trident, the CSS rendering engine. Depending on what Outlook your boss is on, the worse it can get. Outlook 2010 actually reverted to an older version of Trident because of Microsoft losing the Anti-trust case with the EU, so whatever version was before 2010 actually renders better, however they are both quite subpar @ best.
you're going to want to literally stop developing with modern html/css and fall back on old school table layouts. i know, its gross, but you're going to have to do it for email.
the best tests are native, but if you don't have access to both versions (not many do) you should check out EmailOnAcid.com, they provide a plethora of email clients you can test on.
constantcontact.com, mailchimp.com and campaignmonitor.com all offer more than testing services if you need anything else.
Outlook 2007 是个坏人。任何新的或旧的都更好。在 Outlook 2007 中,许多 CSS 命令不起作用。
请参阅此页面:http://www.email-standards.org/ 了解详细信息。
不过,尝试将您的电子邮件发送到 Gmail.com,看看它在 Gmail 网络界面中的显示方式 - Gmail 的限制非常严格,根据经验,如果它显示得很好,那么在其他界面中也应该看起来不错。网络客户端也是如此。
关于 HTML 电子邮件的一些建议:
宽度
,否则 CSS 可能会崩溃。/
、
float
的padding
> 以及其他各种事情。height
更改为min-height
,因此使用高度是没有用的。然而,浏览器不尊重的
min-height
,因此td>s 可用于确保应用最小高度。
包裹图片,并设置外层
div
的背景色和颜色,并为图片提供alt
(替代文本) (另请注意,带有空src
的图像在浏览器渲染时不会保留宽度和高度)。Outlook 2007 is the bad guy. Any newer or older is much better. In Outlook 2007 lots of CSS commands don't work.
See this page: http://www.email-standards.org/ for details.
However, try sending your emails to Gmail.com and see how it gets displayed in Gmail web interface - Gmail is quite restrictive and as a rule of thumb, if it displays nicely, it should look good in other web clients too.
Some advice regarding HTML emails:
width
for Outlook, otherwise the CSS may crash.padding
for<div>
s /<p>
s,float
and various other things.height
tomin-height
so using height is useless. Howevermin-height
of<td>
is not respected by the browsers, so internal<div>
s inside<td>
s can be used to assure that min-height was applied.<div>
and set background color and color of this outerdiv
, and providealt
(alternative text) for image (note also that images with emptysrc
do not preserve width and height while rendered by the browser).