背景色拒绝在Outlook中应用

时间:2019-04-10 07:48:15

标签: html css outlook html-email

这是我的html电子邮件中的一段代码-在此部分中,尽管使用了bgcolor和background style属性,该颜色仍无法在Outlook中应用

我已经附上了它的外观截图

enter image description here

紧挨标题上方的td不会变色。

任何帮助都会很棒

<table width="650" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="fe513e" class="wrapper" style="margin-left:auto; background-color:#fe513e !important; font-size:1px; line-height:1px; margin-right:auto;" mc:repeatable mc:variant="Newsletter title">
  <tr>
    <td height="20" style="line-height:1px; font-size:1px; background-color:#fe513e !important;" bgcolor="#fe513e" class="fix_height"></td>
  </tr>
  <tr>
    <td width="30" bgcolor="#fe513e" style="background-color:#fe513e !important;" class="hide"></td>
    <td class="pad_side">
      <table width="100%" border="0" cellspacing="0" style="background-color: #fe513e !important;" cellpadding="0" align="center" class="wrapper" bgcolor="#fe513e">
        <tr>
          <td class="black" align="center" bgcolor="#fe513e" valign="top" style="font-family:Arial, sans-serif;font-size:20px;font-weight:600;letter-spacing:0;line-height:25px;color:#ffffff; background-color:#fe513e !important;" mc:edit="newsletter_title_1">The Latest News for October 2018</td>
        </tr>
        <tr>
          <td height="20" bgcolor="#fe513e" style="line-height:1px;font-size:1px; background-color: #fe513e;" class="fix_height"> </td>
        </tr>
      </table>
    </td>
    <td width="30" bgcolor="#fe513e" style="background-color: #fe513e !important" class="hide"> </td>
  </tr>
</table>

2 个答案:

答案 0 :(得分:1)

设置表#时您错过了bgcolor,因此Outlook for Desktop将不会将其提取。

所以这个:

<table width="650" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="fe513e" class="wrapper" style="margin-left:auto; background-color:#fe513e !important; font-size:1px; line-height:1px; margin-right:auto;" mc:repeatable mc:variant="Newsletter title">

应该是:

<table width="650" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#fe513e" class="wrapper" style="margin-left:auto; background-color:#fe513e !important; font-size:1px; line-height:1px; margin-right:auto;" mc:repeatable mc:variant="Newsletter title">

答案 1 :(得分:0)

添加colspan =“ 3”将使其完美

<table width="650" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#fe513e" class="wrapper" style="margin-left:auto; background-color:#fe513e !important; font-size:1px; line-height:1px; margin-right:auto;" mc:repeatable mc:variant="Newsletter title">
    <tr>
      <td height="20" style="line-height:1px; font-size:1px; background-color:#fe513e !important;" colspan="3" bgcolor="#fe513e" class="fix_height"></td>
      
    </tr>
    <tr>
      <td width="30" bgcolor="#fe513e" style="background-color:#fe513e !important;" class="hide"></td>
      <td class="pad_side">
        <table width="100%" border="0" cellspacing="0" style="background-color: #fe513e !important;" cellpadding="0" align="center" class="wrapper" bgcolor="#fe513e">
          <tr>
            <td class="black" align="center" bgcolor="#fe513e" valign="top" style="font-family:Arial, sans-serif;font-size:20px;font-weight:600;letter-spacing:0;line-height:25px;color:#ffffff; background-color:#fe513e !important;" mc:edit="newsletter_title_1">The Latest News for October 2018</td>
          </tr>
          <tr>
            <td height="20" bgcolor="#fe513e" style="line-height:1px;font-size:1px; background-color: #fe513e;" class="fix_height"> </td>
          </tr>
        </table>
      </td>
      <td width="30" bgcolor="#fe513e" style="background-color: #fe513e !important" class="hide"> </td>
    </tr>
  </table>

相关问题