HTML电子邮件:填充无法在Gmail中运行

时间:2016-08-31 06:07:16

标签: html css html-table



<table>
  <tr>
    <td valign="top" align="center">
      <span style="color: black; text-align: center; text-transform: uppercase; font-weight:100 !important; letter-spacing: 8px; font-size: 35px;font-family: 'open sans', arial, sans-serif;">TIECON</span>
    </td>
  </tr>

  <tr>
    <td valign="top" align="center">
      <span style="color: black; text-align: center; text-transform: uppercase; font-weight:100 !important; letter-spacing: 8px; font-size: 35px;font-family: 'open sans', arial, sans-serif;">AHMEDABAD</span>
    </td>
  </tr>

  <tr>
    <td valign="top" align="center">
      <span style="color: black; text-align: center; text-transform: uppercase; font-weight:100 !important; letter-spacing: 8px; font-size: 35px;font-family: 'open sans', arial, sans-serif;">2016</span>
    </td>
  </tr>
</table>
&#13;
&#13;
&#13;

我可以在浏览器中看到填充,但不能在 gmail 中看到。

 image with padding

image without padding in gmail

PS:在制作HTML电子邮件时,我必须坚持table内联css

谢谢。

1 个答案:

答案 0 :(得分:0)

尝试使用line-height:35px

<table>
  <tr>
    <td valign="top" align="center">
      <span style="color: black; text-align: center; text-transform: uppercase; font-weight:100 !important; letter-spacing: 8px; font-size: 35px;font-family: 'open sans', arial, sans-serif; line-height:35px;">TIECON</span>
    </td>
  </tr>

  <tr>
    <td valign="top" align="center">
      <span style="color: black; text-align: center; text-transform: uppercase; font-weight:100 !important; letter-spacing: 8px; font-size: 35px;font-family: 'open sans', arial, sans-serif;line-height:35px;">AHMEDABAD</span>
    </td>
  </tr>

  <tr>
    <td valign="top" align="center">
      <span style="color: black; text-align: center; text-transform: uppercase; font-weight:100 !important; letter-spacing: 8px; font-size: 35px;font-family: 'open sans', arial, sans-serif;line-height:35px;">2016</span>
    </td>
  </tr>
</table>