简体   繁体   English

Outlook的HTML电子邮件条件注释(边距)

[英]HTML E-Mail conditional comment for Outlook (margin)

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 在处理电子邮件模板时,我注意到outlook和outlook.com去除了“保证金”,我的解决方案是为诸如

<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?)? 任何人都知道Outlook的所有版本是否都剥夺了利润,或者仅仅是其中的一部分(更新的?)? I read Microsoft dropped support for margin, but I didn' find any information in which version it was dropped. 我读过Microsoft放弃了对margin的支持,但没有找到有关该版本被删除的任何信息。

do i have to use additional condition to avoid older versions of outlook rendering margin like 我是否必须使用其他条件来避免旧版本的Outlook呈现余量,例如

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

to only affect 2007+ for example? 例如仅影响2007+?

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 ! Outlook 支持margin ,但是要padding ,所以请使用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 . 特定于Outlook 2007 信息


But if you really must ( sigh ).. it is possible; 但是如果你真的必须叹气 )..那是可能的。 the below is targeting Outlook 2007 specifically: 以下内容专门针对Outlook 2007:

<!--[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: mso 9与Outlook 2007相关的更多信息:

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! 祝好运!

As per the EmailonAcid Article Outlook.com DOES Support Margins. 根据EmailonAcid文章 Outlook.com确实支持保证金

The fix for this is ridiculously simple. 解决此问题的方法非常简单。 All you have to do is capitalize the "M" in Margin. 您要做的就是在保证金中将“ M”大写。 That's right, changing all of your "margin" to "Margin" will cause them to work properly in Outlook.com. 没错,将所有“保证金”更改为“保证金”将使它们在Outlook.com中正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM