简体   繁体   English

HTML电子邮件模板Mailchimp,Outlook和Gmail中的CSS问题

[英]HTML Email template Mailchimp, CSS problems in Outlook and Gmail

I've developed HTML Email template and imported to Mailchimp. 我已经开发了HTML Email模板并将其导入Mailchimp。 It works perfect in testing mode. 它在测试模式下工作完美。 When I send it, Gmail, Outlook and Windows Mail have problems with CSS style loading. 当我发送邮件时,Gmail,Outlook和Windows Mail在CSS样式加载方面存在问题。 It shows only HTML. 它仅显示HTML。

Then I tried to develop with tables without linking CSS, again perfect in Mailchimp testing and problems Gmail, Outlook and Windows Mail. 然后,我尝试使用不链接CSS的表进行开发,这在Mailchimp测试中又是完美的选择,并且可以解决Gmail,Outlook和Windows Mail的问题。 As there are not loading even STYLE attribute of tables. 由于没有加载表的STYLE属性。

Please help. 请帮忙。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Email Design</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
    <body style="margin: 0; padding: 0;">
 <table align="center" border="1" cellpadding="0" cellspacing="0" width="600" background="img/beton.jpg" style="">
 <tr>
  <td >
 <img src="img/logo.png" alt="Creating Email Magic" width="160" height=auto align="right"  style="padding: 49px 60px; 0 0; left:548px; display: block;" />
 <a href="facebook.com"><img src="img/facebook.png" alt="Creating Email Magic" width="50" height=auto align="right"  style="padding: 39px 0px 0 0px; 0 0; left:548px; display: block;" /></a>
       <img src="img/newsletter_h1.png" alt="Creating Email Magic" width="342" height=auto align="left"  style="padding: 0px 00px; 0 0; display: block;" />


</td>
 </tr>
 <tr>
  <td >
   Row 2
  </td>
 <tr>
  <td >
   Row 3
  </td>
 </tr>
</table>

        <div></div>
</body>




</html>

Maybe issue in header type in mail. 可能是邮件标题中的问题。 Please check your headers as per below. 请按照以下说明检查标题。

// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

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

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