Why in firefox, internet explorer, chrome web browser my email template show correctly aligned, but in Microsoft outlook email reader it gets broken?
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. B开发者_运维技巧ut 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
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 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:
- Outlook
- It is good to provide
width
for Outlook, otherwise the CSS may crash. - Outlook doesn't support
padding
for<div>
s /<p>
s,float
and various other things.
- It is good to provide
- Gmail
- For Gmail, you should use inline CSS in preference to defining classes.
- Gmail actually parses CSS provided by you and for instance, changes
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. - Gmail strips background images, and generally in all email clients images are displayed upon user request for security reasons. Therefore, wrap images with
<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).
精彩评论