删除Outlook 2013-2016中的1px差距

时间:2016-09-23 18:09:49

标签: outlook html-email vml

我正试图摆脱Outlook 2010,2013,2016中出现的vml图形最右侧的1px差距。

据我所知,Outlook会自动将<p></p>添加到xml的底部,这就是为什么我将字体大小和行高调整为零,从而修复了底部的间隙。有关可能自动添加的其他内容的任何建议可能会添加空格吗?

<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
  <v:polyline style="width: 500px; 24px; display: inline-block; padding-right: 0pt; border: 0pt !important;" fillcolor="#563d82" strokecolor="#563d82" strokeweight="0pt" stroke="false" coordorigin="0 0" coordsize="24 500" v:borderrightcolor="#ff0000" points="0pt,24pt, 500pt,24pt, 500pt,0pt, 0pt,24pt">
  </v:polyline>
</xml>

完整的HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width"/>
</head>
<body>
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; padding: 0px !important; margin: 0;">
  <tr>
    <td align="right" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0;">
      <table cellpadding="0" cellspacing="0" border="0" align="right" width="498" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; padding: 0pt !important; margin: 0pt; overflow: hidden; display: inline-block;">
        <tr align="right">
          <td align="right" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; mso-margin-top-alt: 0pt; mso-margin-bottom-alt: 0px; padding: 0px !important; margin: 0; font-size: 0; line-height: 0; display: inline-block;">
            <xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
            <v:polyline style="width: 500px; 24px; display: inline-block; padding-right: 0pt; border: 0pt !important;" fillcolor="#563d82" strokecolor="#563d82" strokeweight="0pt" stroke="false" coordorigin="0 0" coordsize="24 500" v:borderrightcolor="#ff0000" points="0pt,24pt, 500pt,24pt, 500pt,0pt, 0pt,24pt">
            </v:polyline>
            </xml>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table bgcolor="#563d82" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; padding: 0px !important; margin: 0;">
  <tr>
    <td align="center">
      <p class="footerlink" style="padding: 0px; color: #ffffff; font-size: 18px; line-height: 22px; text-align: left;">Placeholder text.</p>
    </td>
  </tr>
</table>
</body>
</html>

我应该添加此html仅在Outlook中可见。我有一个涵盖所有其他浏览器的CSS图形。太糟糕了,无法使用Outlook。

1 个答案:

答案 0 :(得分:0)

更换两个表以进行右对齐可以修复最右边的1px间隙。

<div align="right" style="font-size: 0; line-height: 0;">
  <xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
    <v:polyline fillcolor="#563d82" strokeweight="0pt" stroke="false" strokecolor="#563d82" style="font-size: 0; line-height: 0;" points="0pt,25pt 500pt,25pt 500pt,0pt 0pt,25pt"></v:polyline>
  </xml>
</div>

这修复了Outlook 2016和Windows 10 Mail的对齐问题,但它在vml图形和Outlook 2010和2013的表之间留下了细线白线。我尝试添加css和表格边框,但它没有解决问题。