Email 闯入<;td>;仅在2016年展望中

Email 闯入<;td>;仅在2016年展望中,email,html-table,outlook,html-email,outlook-2016,Email,Html Table,Outlook,Html Email,Outlook 2016,我有一封带有img和td的“border”的电子邮件。只有在Outlook 2016 TD的宽度为260px显示在中间休息。我不知道为什么。我用cellpading:0、Celspacking:0等复制了许多样式,但没有任何帮助。问题似乎只有在2016年展望中才会出现。同样的电子邮件代码也适用于其他Outlook和web电子邮件客户端 这是我的html代码: <table style="border-collapse:collapse;margin: 0; padding: 0;

我有一封带有img和td的“border”的电子邮件。只有在Outlook 2016 TD的宽度为260px显示在中间休息。我不知道为什么。我用cellpading:0、Celspacking:0等复制了许多样式,但没有任何帮助。问题似乎只有在2016年展望中才会出现。同样的电子邮件代码也适用于其他Outlook和web电子邮件客户端

这是我的html代码:

    <table style="border-collapse:collapse;margin: 0; padding: 0; line-height: 0; font-size: 0; width: 335px; display: inline-block; text-align: center; vertical-align: top;"
  border="0" cellspacing="0" cellpadding="0" align="center" valign="top">
  <tbody>
    <tr>
      <td style="margin: 0; padding: 0; width: 20px; display: inline-block; text-align: center;" width="20">
      </td>
      <td style="margin: 0; padding: 0; line-height: 0; font-size: 0; width: 270px; text-align: center; background-color: #ffe0e6;"
        border="0" cellspacing="0" cellpadding="0" align="center" width="270">
        <img src="https://picsum.photos/270/270" width="270" style="max-width: 270px; max-height: 270px; margin: 0; padding: 0; line-height: 0; font-size: 0; border: 0; outline: 0; display: block; border-collapse:collapse;"
          border="0" outline="0" height="270" align="top" cellpadding=”0″>
      </td>
      <td style="margin: 0; padding: 0; line-height: 0; font-size: 0; text-align: center;" border="0" cellspacing="0" cellpadding="0"
        align="center">
        <table style="border-collapse:collapse;margin: 0; padding: 0; display: inline-block; line-height: 0; text-align: center; font-size: 0; vertical-align: top;"
          border="0" cellspacing="0" cellpadding="0" align="center">
          <tbody>
            <tr>
              <td style="width:10px; height: 10px; line-height:0; font-size: 0" height="10" width="10">&nbsp;
              </td>
            </tr>
            <tr>
              <td style="width:10px; height: 260px; background-color: #ffe0e6;  line-height:0; font-size: 0" height="260" width="10">&nbsp;
              </td>
            </tr>
          </tbody>
        </table>
      </td>
      <td style="margin: 0; padding: 0; width: 25px; display: inline-block; text-align: center; height: 270px;" width="25" height="270">&nbsp;
      </td>
    </tr>
    <tr>
      <td style="margin: 0; padding: 0; width: 20px; height: 10px; display: inline-block; text-align: center; line-height:0; font-size: 0"
        width="20" height="10">
      </td>
      <td style="margin: 0; padding: 0; line-height: 0; font-size: 0; text-align: center;" border="0" cellspacing="0" cellpadding="0"
        align="center">
        <table style="border-collapse:collapse;margin: 0; padding: 0; display: inline-block; text-align: center; font-size: 0; line-height: 0; vertical-align: top; height: 10px"
          border="0" cellspacing="0" cellpadding="0" align="center" height="10">
          <tbody>
            <tr>
              <td style="margin: 0; padding: 0; height: 10px; width: 10px; line-height:0; font-size: 0; background-color: #ffffff;" width="10"
                height="10">&nbsp;
              </td>
              <td style="margin: 0; padding: 0; height: 10px; width: 260px; line-height:0; font-size: 0;  background-color: #ffe0e6;" width="260"
                height="10">&nbsp;
              </td>
            </tr>
          </tbody>
        </table>
      </td>
      <td style="margin: 0; padding: 0; height: 10px; width: 10px; line-height:0; font-size: 0; background-color: #ffe0e6;" width="10"
        height="10">&nbsp;
      </td>
      <td style="margin: 0; padding: 0; width: 35px; display: inline-block; line-height:0; font-size: 0; text-align: center;" width="35">&nbsp;
      </td>
    </tr>
    <tr>
      <td style="margin: 0; padding: 0; height: 30px; display: inline-block; line-height:0; font-size: 0; text-align: center;"
        height="30">&nbsp;
      </td>
    </tr>
  </tbody>
</table>

我在发生断裂的粉红色td元素中圈出了断裂

那条粉红色的垂直线应该都是粉红色的。 是td:

<td style="width:10px; height: 260px; background-color: #ffe0e6;  line-height:0; font-size: 0" height="260" width="10">&nbsp;
              </td>

您的表结构似乎不必要地复杂。您的内嵌样式有一些不需要的命令。左边的表格单元格似乎什么也没做。为了简单起见,我创建了一个新表。例如,我创建了一个样式表:

样式表:

<style>
  table {
    border-spacing: 0 !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    margin: 0 auto !important;
  }
</style>
<!--[if mso]><style>
  table, td {
    mso-table-lspace: 0pt !important;
    mso-table-rspace: 0pt !important;
    border-collapse: collapse;
  }
  img {
    -ms-interpolation-mode:bicubic;
  }
</style><![endif]-->
需要注意的是,它对Outlook、Gmail不起作用,但如果对你起作用,它的风格就容易多了。我是为其他想在图像中添加阴影的人提这一点的

祝你好运

<table border="0" cellspacing="0" cellpadding="0">
  <tr>
      <td bgcolor="#ff0000">
        <img src="https://picsum.photos/270/270" width="270" style="max-width: 270px; max-height: 270px; margin: 0; padding: 0; line-height: 0; display: block;" border="0" outline="0" height="270" align="top" /></td>
      <td bgcolor="#ff0000" valign="top" width="10">
        <table bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin: 0; padding: 0; line-height: 0; text-align: center; font-size: 0; vertical-align: top;">
            <tr>
              <td width="10" height="10">&nbsp;
              </td>
            </tr>
        </table>
    </td>
  </tr>
  <tr>
    <td bgcolor="#ff0000" align="left" height="10" style="max-height: 10px !important;">
        <table align="left" bgcolor="#ffffff" height="10" height="10" border="0" cellspacing="0" cellpadding="0" style="margin: 0; padding: 0; line-height: 0; font-size: 0;">
            <tr>
              <td width="10" height="10">
              </td>
            </tr>
        </table>
    </td>
    <td bgcolor="#ff0000"></td>
</tr>   
<img src="https://picsum.photos/270/270" width="270" style="max-width: 270px; max-height: 270px; margin: 0; padding: 0; line-height: 0; display: block; box-shadow: 10px 10px 0px red;" border="0" outline="0" height="270" align="top" />