CSS 样式在 Outlook 2010 中不起作用?

发布于 2024-12-18 08:32:46 字数 291 浏览 2 评论 0原文

如果我在 Outlook 中使用样式,它将不起作用。

我该如何修复它?我正在谈论这个样式代码:

<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;">

If I use styling in my outlook, it won't work.

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;">

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

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

发布评论

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

评论(5

如果没有你 2024-12-25 08:32:46

不幸的是,Outlook 支持与 IE5 兼容的 HTML 大致相同的内容。这真的太可怕了。以下是有关 Outlook 中的 Word 2007 HTML 和 CSS 呈现功能的详细 MSDN 文章2007,我认为 Outlook 2010 没有太大变化。

老实说,这是我能够让 Outlook HTML 看起来像我的样子的唯一方法想要的是使用大致 HTML2 标准标签和属性来手动生成 HTML,而不是使用 CSS。一些 CSS 会渲染,但它确实是命中注定的。

Unfortunately Outlook supports something roughly equivalent to IE5 compatible HTML. It's really terrible. 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.

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 really hit or miss.

红衣飘飘貌似仙 2024-12-25 08:32:46

也许这可以帮助 http://www.campaignmonitor.com/css/ 这是一个表,什么是支持电子邮件


编辑
不支持 min|max-width|height

Maybe this can help http://www.campaignmonitor.com/css/ It's a table, what is supported in E-Mails


edit
min|max-width|height not supported

末骤雨初歇 2024-12-25 08:32:46

http://htmlemailboilerplate.com/

我一直使用它作为我的 HTML 电子邮件活动的基础。

yunzen 发布到 Campaign Monitor 的链接是一个很好的资源。

http://htmlemailboilerplate.com/

I've been using that as a base for my HTML email campaigns.

And the link yunzen posted to campaign monitor is a great resource.

倾城泪 2024-12-25 08:32:46

链接到的 MSDN 文章 superlime 讲述了悲伤的故事:无论出于何种不可理解的原因,Microsoft 恢复了近 10 年来使用 Outlook2007 处理 HTML 电子邮件的方式,并且认为不适合在 2010 年修复它

。不厌其烦地为邮件用户代理领域的其余部分设计格式良好的 HTML 布局,我确实看到了一种节省的解决方法,这就是我将指导我的用户使用的方法,而不是花费我的 尝试重建古老的 HTML 的时间:

使用 Outlook 提供的在浏览器中查看选项来阅读电子邮件。这会按预期重新组装 HTML。

The MSDN article superlime 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.

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 my time trying to reconstruct ancient HTML:

Use the VIEW IN BROWSER option Outlook offers for reading an email message. That re-assembles the HTML as intended.

桃扇骨 2024-12-25 08:32:46

尝试添加 3 列表格,单击下面的示例链接。

示例:链接

<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>

Try adding 3 columns table, click on the example link below.

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