Problem with Style in Outlook

拈花ヽ惹草 提交于 2019-12-11 16:15:16

问题


I have a mail in Outlook which is having an Html layout and has defined some Styles in style tag. When I open Outlook in IE and open the mail, it works fine and show me the correct layout. But, when I have used same in Firefox, the style part doesn't work. When I view source, I could not see Style tags.


回答1:


Style tags are notoriously badly supported by Outlook and other HTML E-Mail clients.

The convention is to use inline CSS for Rich E-Mail.

Check out this great overview: Style in E-Mail

mail readers have far greater diversity than browsers and support of HTML ranges from none to limited CSS. While a few of the newest mail readers might support CSS, its almost always safest to stay with very conservative (old) markup. HTML for emails going to the overall web should be written in HTML3.2 with limited use of CSS1.

Design your HTML with the following guidelines:

  • Use HTML3.2 DOCTYPE for all email going to non-restricted internet domains
  • If your audience is restricted to AOL, you can safely use HTML4.01 transitional or experiment with XHTML1.0
  • Validate the HTML and keep it very clean. After you validate, shred the validation with the following hacks.
  • Use CSS1 and extremely limited CSS2. If NN4.7 can parse it, it's probably safe. Otherwise: TEST.



回答2:


Another great resource that I always use is Campaign Monitor's Articles and Tips section. Their Guide to CSS support in email clients is just fantastic! There's loads of info on how to get started, etc...

Hope this helps!



来源:https://stackoverflow.com/questions/2462582/problem-with-style-in-outlook

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!