1

working on an e-mail template i noticed outlook and outlook.com strips out "margin", my solution is to add additional line for those clients like

<td height="20" valign="top">&nbsp;</td>

but i would like to use margin on supported clients, so i put this in a conditional block

<!--[if mso]>
<td height="20" valign="top">&nbsp;</td>
<![endif]-->

Anyone knows if ALL versions of outlook are stripping out margin or is it just some of them (newer ones?)? I read Microsoft dropped support for margin, but I didn' find any information in which version it was dropped.

do i have to use additional condition to avoid older versions of outlook rendering margin like

<!--[if (gte mso 12)]>

to only affect 2007+ for example?

Lukas
  • 31
  • 6
  • http://stackoverflow.com/questions/18959034/reliable-solution-for-conditional-comments-in-outlook-com-html-emails Here is a link to someone else who found a solution to certain Outlook based problems. – Tania Rascia Jul 24 '15 at 14:09
  • You can use `cellspacing` and `cellpadding` – Andrew Jul 24 '15 at 14:19

2 Answers2

2

Don't do that -- the idea is you find a solution for the margin that resolves everywhere your supporting. Do not hack or try to condition an email!

margin is not supported in Outlook but, padding is, so use padding!

There is also additional reach arounds you could utilize such as nesting additional tables or using small white images to recreate the space. There is always a solution that you can use across - your email will be much more stable if you find it instead of trying to hack with conditionals.

Also this is a decent reference.

Specific to outlook 2007 info.


But if you really must (sigh).. it is possible; the below is targeting Outlook 2007 specifically:

<!--[if gte mso 12]>
    <style type="text/css">
    /* Your Outlook-specific CSS goes here. */
    </style>
<![endif]-->

the mso 9 correlates with outlook 2007 below is a list of more:

Outlook 2000 - Version 9
Outlook 2002 - Version 10
Outlook 2003 - Version 11
Outlook 2007 - Version 12
Outlook 2010 - Version 14
Outlook 2013 - Version 15

Read More about this.

Note: While this is possible, I still suspect using these will create more problems in the long wrong.

Good luck!

Dr Upvote
  • 8,023
  • 24
  • 91
  • 204
0

As per the EmailonAcid Article Outlook.com DOES Support Margins.

The fix for this is ridiculously simple. All you have to do is capitalize the "M" in Margin. That's right, changing all of your "margin" to "Margin" will cause them to work properly in Outlook.com.

AKNair
  • 1,369
  • 1
  • 12
  • 24