【问题标题】:Html email doesnt show margin on hotmail but does on outlookHtml 电子邮件在 hotmail 上不显示边距,但在 Outlook 上显示
【发布时间】:2014-01-28 04:06:44
【问题描述】:

我在dreamweaver 上创建了一个html 电子邮件,并使用了一些文本的边距。

例如:

  <td width="453" height="115" bgcolor="#18b581"><p style="font-family: Arial, Helvetica,    sans-serif; margin-left: 25px;"><strong><font size="4">Hello world?</font>

这在dreamweaver 中显示完美。当我通过 Outlook 发送时,我将其保存为 Outlook 模板。我将它发送到我的 Outlook 帐户和我的 hotmail。边距适用于我的前景,但边距在 hotmail 上不确定,我不知道为什么!!

更新:

         <td  colspan="2" bgcolor="#FFFFFF"><h3  style="font-family: Arial, Helvetica, sans-serif; color:#1d95a5; padding-left: 25px; padding-top:30px; ">What are the benefits of the NP-C directory?</h3>
   <p  style="font-family: Arial, Helvetica, sans-serif; color:#555555; font-size:15px; padding-left: 25px; padding-right: 22px;   padding-top:-20px;">The NP-C directory offers you the opportunity to: </p>
   <ul style="font-family: Arial, Helvetica, sans-serif; color:#555555; font-size:15px; padding-left: 80px; padding-right: 51px; padding-top:-12px;">
  <li><strong>Connect</strong> with healthcare professional colleagues in your local                   country/area who have a shared interest in NP-C</li>
  <li><strong>Network</strong> with healthcare professionals around the world to share                 experiences of NP-C</li>
  <li><strong>Exchange</strong> the latest news and information about NP-C</li>
  </ul>

【问题讨论】:

    标签: html email html-email


    【解决方案1】:

    在 Outlook.com 中,边距为 not supported。而是在父 &lt;td&gt; 元素中使用填充。

    不要这样做:

    <td>
      <p style="margin-left:25px;">Paragraph</p>
    </td>
    

    改为这样做:

    <td style="padding-left:25px;">
      <p>Paragraph</p>
    </td>
    

    【讨论】:

    • 检查我的更新,问题是每个句子我已经在

      中添加了一个样式,所以我必须删除样式并将其添加到

    • 我也发现填充在 Outlook 中不起作用??
    • 填充有效,但只能在&lt;td&gt;标签中使用。对其他 html 标签的支持可能参差不齐。如果您想更改每个段落的缩进(填充),请创建单独的表格行并设置它们的 td 样式,或者在文本中使用多个 &amp;nbsp; 来添加空格/缩进。
    • @John 我有一个类似的question。我想知道你是否可以帮助我。
    【解决方案2】:

    是的,欢迎来到 HTML 电子邮件的危害!

    查看email standards project,他们保留了各种浏览器之间所有差异的目录。

    最好的建议是尽量避免依赖填充和边距,而是使用固定宽度的表格单元格来定位元素。

    【讨论】:

    • 我还在表格的行中添加了图像。但是在浏览器中,图像在中间留下了一个空白区域。但这仅在hotmail中。前景很好。
    猜你喜欢
    相关资源
    最近更新 更多
    热门标签