简体   繁体   English

Email 模板 Outlook 边距和填充不起作用尝试分隔社交媒体图标

[英]Email template Outlook margin and padding not working try to separate social media icons

I'm trying to align center these icons but some outlook emails do not show the right styling some other scenarios work fine but these ones are not working as expected I've been trying several solutions but do not have any luck hope anyone can help with this.我正在尝试将这些图标居中对齐,但一些 outlook 电子邮件没有显示正确的样式,其他一些场景工作正常,但这些没有按预期工作我一直在尝试几种解决方案,但没有任何运气希望任何人都可以提供帮助这个。

Outlook 2016 Outlook 2016 在此处输入图像描述

Outlook 2010 Outlook 2010 在此处输入图像描述

Outlook 2019 Outlook 2019 在此处输入图像描述

This is my code for that section这是我那部分的代码

 <tr style="height: 0;"> <:--[if mso]> <center> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <;[endif]--> <td class="socialTableData" style="border-collapse: collapse; mso-line-height-rule: exactly; padding-left: 100px; padding-right: 100px; margin-left: auto; margin-right: auto; text-align: center; padding-bottom: 16px; align-items: center."> <:--[if mso]> <td> <;[endif]--><a href="https://twitter;com/" style="color: #DA3743; text-decoration: none;"><img height="20" width="20" mari="mari" style="height: 20px.important: width; 20px:important;" src="img" alt="" class="socialImg" /></a> <:--[if mso]> </td> <;[endif]--> <:--[if mso]> <td > <;[endif]--><a href="https://twitter;com/" style="color: #DA3743; text-decoration: none."><img height="20" width="20" style="height: 20px;important: width; 20px:important; padding-left: 32px; padding-right: 32px;" id="facebook" src="img" alt="" class="socialImgMid" /></a> <!--[if mso]> </td> <![endif]--> <!--[if mso]> <td> <![endif]--><a href="https://twitter.com/" style="color: #DA3743; text-decoration: none;"><img height="20" width="20" style="height: 20px !important; width: 20px !important;" src="imge" alt="" class="socialImg" /></a> <!--[if mso]> </td> <![endif]--> </td> <!--[if mso]> </table> </center> <![endif]--> </tr> <!--[if mso]> <center> <![endif]-->

The code that Outlook is attempting to interpret is the following, just for the start: Outlook 试图解释的代码如下,仅作为开始:

<tr style="height: 0;">
  <center>
    <table ...>
      <td ...>
        <td>

If you wanted Outlook to just look at the tables, you should put all of it in Outlook-conditionals, not just some of it.如果你想让 Outlook 只查看表格,你应该把所有的都放在 Outlook 条件中,而不仅仅是其中的一部分。

Non-Outlook environments do not need tables.非 Outlook 环境不需要表格。

If you've written the whole thing in tables, like most of us, I'd just do the following:如果你像我们大多数人一样将所有内容都写在表格中,我会执行以下操作:

<tr>
  <td style="width:100%;text-align:center;">
    <center style="width:100%;">
      <table cellspacing="0" cellpadding="0" border="0">
        <tr>
          <td><img></td> //fill in the details here on these
          <td><img></td> //put some padding here on the <td> if you want a gap between the socials. Or on any of these <td>s.
          <td><img></td>
        </tr>
      </table>
    </center>
  </td>
</tr>

No need for Outlook conditional code because you want the same effect for everything.不需要 Outlook 条件代码,因为您希望所有内容都具有相同的效果。

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

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