博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CSS Padding in Outlook 2007 and 2010
阅读量:2501 次
发布时间:2019-05-11

本文共 1560 字,大约阅读时间需要 5 分钟。

For those of you who design and develop HTML emails for Outlook 2007 and 2010, you already know that you are bound by tables and you have very limited CSS support. What you might not realize is that these two email clients convert your code from something legible into a seemingly foreign Microsoft language.

今天做邮件模板,发现IE下面显示的跟outlook显示的不一样。

[@more@]

One of the more critical conversions that you should be aware of is that Outlook 2007 and 2010 will often move your CSS from div's and headings into nested paragraph and spans. Sometimes, it keeps the outer container, other times it eliminates it entirely.

For example this:

NEW FASHIONS

NEW FASHIONS

NEW FASHIONS

Will get converted to:

p

{mso-style-noshow:yes;
mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;}

NEW FASHIONS

NEW FASHIONS

NEW FASHIONS

The Problem

As you can see, this conversion moved our CSS from its original box element container to an inline SPAN element and the padding was ignored.

Solutions

One work-around is to avoid padding in block element containers and use margins instead.

NEW FASHIONS

Note: I did not include the "margin" nor "margin-top" properties in this example because they are not supported by Hotmail.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/219138/viewspace-1055090/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/219138/viewspace-1055090/

你可能感兴趣的文章