2017-07-11 68 views
0

我正在嘗試爲Outlook準備新聞稿,並且已使用VML設置了頁腳背景色。代碼是這樣的:如何刪除VML頁邊距?

<container class="footermail"> 
<!--[if gte mso 9]> 
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:580px;height:141px;"> 
    <v:fill type="tile" color="#333333" /> 
<![endif]--> 
    <p>blablablablabla</p> 
<!--[if gte mso 9]> 
</v:rect> 
<![endif]--> 
</container> 

問題是,當我通過Outlook的桌面(特別是2106)打開郵件,它顯示周圍的利潤。這裏有一個圖:

mail view

有誰知道如何清理?我已經嘗試了一切,並搜索信息,但它變得非常困難。提前致謝。

回答

0

展望一般來說真的不支持HTML 5,你的問題是沒有這麼多的VML但這個標籤:<container class="footermail">

您不包括完整的代碼和CSS,所以這使得它很難診斷你所有的潛在問題。

我的建議是刪除<container>標記並使用<table>代替背景顏色。類似這樣的:

<table width="100%" border="0" style="background: #333333; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;"> 
    <tr> 
    <td style="background: #333333;border-collapse: collapse;"> 
     <p style="color: #ffffff; text-align: center;">blablablablabla</p> 
    </td> 
    </tr> 
</table> 

此表適用於每個主要的電子郵件客戶端和每個版本的Outlook。儘管在Android版v4的Gmail中有所縮小。

Outlook有很多限制。我建議保留這個方便未來的HTML電子郵件。 https://www.campaignmonitor.com/css/

祝你好運。

+0

感謝您的鏈接,真的很有用;) – atopetek