【发布时间】:2018-12-02 20:32:22
【问题描述】:
我正在处理 html 电子邮件,其中我使用 html 和内联样式复制了设计。
在前景中,我看到了以下设计:
小提琴设计:
附件是fiddle,我在其中提到了我所有的 html 和内联样式。 在fiddle 中,与上面的设计(Outlook)相比,我得到了不同的设计。
问题陈述:
我想知道我应该对小提琴的内联样式进行哪些更改,以便小提琴和上面的屏幕截图(外观)中的设计看起来相同。
与小提琴中的设计相比,outlook 屏幕截图中赚钱的步骤 文本下方的空间太大。我在该部分中使用的代码 sn-ps 是:
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="padding-left:15%;padding-bottom:25%;">
<tr>
<td>
<h2 style="text-align: left;
padding-left: 19%;
color: #484848;
padding-top: 2.5%;
padding-bottom: 5%;
padding-right: 12%;">steps to earn your money:</h2>
</td>
</tr>
<tr style="text-align:left;color:#484848;font-size:20px;">
<td>
1. click here to open the XYZ app to the posting requests page<br><br>
2. click on availability check request<br><br>
3. say yes, its availabile ot suggest another date it is<br><br>
4. wait the 1 or 24 hour confirmation good<br><br>
5. three days after the booking ends money will be send to your account<br><br>
</td>
</tr>
</table>
【问题讨论】:
-
您是否尝试打开开发工具 (F12) 并检查电子邮件中的表格以查看正在应用的样式?
-
Outlook 不支持填充。您需要使用其他方式在元素周围创建间距,例如添加空表行/列或添加
height/line-height/width/text-align样式。 -
不,也不支持margin。
-
不,这就是创建电子邮件模板的痛苦。
-
我检查了更多来源,显然填充确实在 Outlook 中有效,但前提是您遵循最佳实践。请参阅this 帖子。
标签: html css html-table outlook html-email