HTML Email Signature CSS Not Working in Some Email Clients [duplicate]

可紊 提交于 2021-01-29 07:40:40

问题


I'm trying to create a html based email signature with tables.

It's definitely working in html, works when I copy and paste into gmail, however when I copy into Outlook, the CSS break. Did I do something wrong here?

<table style="width: 500px; font-size: 12pt; font-family: Arial,sans-serif; line-height:normal;" cellpadding="0" cellspacing="0">
<tbody>
 <tr> 
  <td style="width:86px; vertical-align:middle;" valign="middle">
   <a href="#" target="_blank"><img border="0" alt="Logo" height="auto" width="148" style="width:148px; height:auto; border:0;" src="https://i.imgur.com/1HlZfl8.png"></a>
   
  </td>
  

  <td style="width:45px; text-align:center; vertical-align:middle;" valign="middle">
   <div style="margin-left:15px"><img src="https://i.imgur.com/mNNR1Ga.png"></div>
  </td>
  <td style="width:500px; vertical-align:middle;" valign="middle">
   <table cellpadding="0" cellspacing="0" width="100%">
   <tbody>
    <tr>
     <td style="font-size:12pt; font-family: Arial, sans-serif; color: #3d3c3f; padding-bottom:3px;"><span style="font-weight: bold; font-family: Arial, sans-serif; color:#3c3c3b;">Jessica Smith</span>
      <span style="font-size:9pt; font-family: Arial, sans-serif; color:#3c3c3b;"> | CEO/Founder</span></td>
    </tr>
    <tr>
     <td style="font-size:9pt; font-family: Arial, sans-serif; color: #9b9b9b; padding-bottom:1px;"><span style="font-family: Arial, sans-serif; color:#3c3c3b;"><div style="font-weight:bold; display: inline-block; width: 15px;">t </div>(07) 3281 0000</span><span style="font-family: Arial, sans-serif; color:#3c3c3b"></span><span style="font-family: Arial, sans-serif; color:#3c3c3b; margin-left:10px;"><div style="font-weight:bold; display: inline-block; width: 15px;">f</div>(07) 3281 0000</span>
     </td>
    </tr>       
    <tr>
     <td width="20px" style="font-size:9pt; font-family: Arial, sans-serif; color: #9b9b9b; padding-bottom:1px;"><span style="font-family: Arial, sans-serif; color:#3c3c3b; "><div style="font-weight:bold; display: inline-block; width: 15px;">e </div><a href="#" style="color: #006f71;">info@domainnamehere.com.au</a></span>
     </td>
    </tr>       
    <tr>
     <td style="font-size:9pt; font-family: Arial, sans-serif; color: #9b9b9b; padding-bottom:1px;"><span style="font-family: Arial, sans-serif; color:#3c3c3b;"><div style="font-weight:bold; display: inline-block; width: 15px;">w </div><a href="#" style="color: #006f71;">domainnamehere.com.au</a></span>
     </td>
    </tr>       
    
   </tbody>
   </table>
  </td>
 </tr>
 <tr>
  <td style="width:500px; padding-top:16px;" colspan="3" width="500">
   <a href="#" target="_blank" rel="noopener"><img border="0" alt="Banner" width="500" style="width:500px; height:auto; border:0;" src="https://i.imgur.com/NBxWjRC.png"></a>
  </td>
 </tr>  
</tbody>
</table>

Gmail Screenshot
Outlook Screenshot

Not sure what's going on.


回答1:


Email clients does not strictly follow HTML Standards. The viewing technology of a typical email client isn't as up-to-date as a web browser. You need to be careful about that. HTML code works in your browser may not work on Email Clients.

You may want to read Mailchimps Article and visit this link for the CSS Support



来源:https://stackoverflow.com/questions/54340353/html-email-signature-css-not-working-in-some-email-clients

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!