CSS 样式在 Outlook 2010 中不起作用?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8310609/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
CSS Styling won't work in outlook 2010?
提问by user1032254
If I use styling in my outlook, it won't work.
如果我在 Outlook 中使用样式,它将不起作用。
how can I fix it? I am talking about this style code:
我该如何解决?我说的是这种风格的代码:
<div id="BodyID" Style=" word-spacing:2px; min-width:0px; min-height:0px;max-width:693px; max-height:490px; height:485px; background-color:#f4f4f4; border:1px solid #e4e4e4; font-family:Arial;">
回答by superlime
Unfortunately Outlook supports something roughly equivalent to IE5 compatible HTML. It's reallyterrible. Here's a detailed MSDN article on the Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007, which I don't believe changed much for Outlook 2010.
不幸的是,Outlook 支持的东西大致相当于 IE5 兼容的 HTML。这真的很可怕。这是有关Outlook 2007 中的Word 2007 HTML 和 CSS 呈现功能的详细 MSDN 文章,我认为 Outlook 2010 的变化不大。
Honestly, the only way I've been able to get outlook HTML to look the way I want is to hand generate the HTML using roughly HTML2 standard tags and properties and not using CSS at all. Some CSS renders, but it's reallyhit or miss.
老实说,我能够让 Outlook HTML 看起来像我想要的方式的唯一方法是使用大致 HTML2 标准标签和属性手动生成 HTML,而根本不使用 CSS。一些 CSS 渲染,但它真的很受欢迎。
回答by yunzen
Maybe this can help http://www.campaignmonitor.com/css/It's a table, what is supported in E-Mails
也许这可以帮助http://www.campaignmonitor.com/css/这是一个表格,电子邮件中支持什么
editmin|max-width|height
not supported
min|max-width|height
不支持编辑
回答by Christopher Marshall
http://htmlemailboilerplate.com/
http://htmlemailboilerplate.com/
I've been using that as a base for my HTML email campaigns.
我一直在使用它作为我的 HTML 电子邮件活动的基础。
And the link yunzen posted to campaign monitor is a great resource.
yunzen 发布到竞选监视器的链接是一个很好的资源。
回答by fortboise
The MSDN articlesuperlime linked to tells the sad story: for whatever incomprehensible reasons, Microsoft reverted nearly 10 years in their handling of HTML email w/Outlook2007, and did not see fit to fix it in 2010.
链接到的MSDN 文章superlime 讲述了一个悲伤的故事:无论出于什么莫名其妙的原因,Microsoft 使用 Outlook2007 处理 HTML 电子邮件的时间恢复了近 10 年,并且认为在 2010 年不适合修复它。
Having taken the trouble to design a well-formatted HTML layout for rest of the universe of mail user agents, I do see one saving workaround, which is what I'm going to direct my users to, rather than spend mytime trying to reconstruct ancient HTML:
已经不厌其烦地设计一个格式良好的HTML布局的邮件用户代理的宇宙的其余部分,我看到一个解决办法节省,而这正是我要我的用户引导到,而不是花我的时间,试图重建古代 HTML:
Use the VIEW IN BROWSERoption Outlook offers for reading an email message. That re-assembles the HTML as intended.
使用Outlook 提供的在浏览器中查看选项来阅读电子邮件。这会按预期重新组装 HTML。
回答by Rakesh Vadnal
Try adding 3 columns table, click on the example link below.
尝试添加 3 列表,单击下面的示例链接。
Example: Link
示例:链接
<table border="0" cellspacing="0" width="100%">
<tr>
<td></td>
<td width="400">
<table border="1" cellspacing="0" width="100%">
<tr>
<td>
Content here...
</td>
</tr>
</table>
</td>
<td></td>
</tr>
</table>