【问题标题】:Why doesn’t add a div bottom of another div in sending email?为什么不在发送邮件时添加另一个 div 的 div 底部?
【发布时间】:2015-08-28 14:15:52
【问题描述】:

我想在另一个 div 的底部添加一个 div。我已经测试了这段代码,它工作正常。

<div style="position: relative; width: 200px; height: 150px;">
<div style="position: absolute; bottom: 0; width: 100%; height: 50px; border: 1px solid red;">
</div>
</div>

但是当我使用它作为发送电子邮件的模板时,它不起作用。当我在 firebug 中检查 css 代码时,只有这个样式没有设置(只是: position:absolute;bottom:0; 和 position:relative;)但是添加了另一个 css 样式。 我使用easeendmail 发送邮件。 有什么问题?

【问题讨论】:

  • 你在哪个邮件客户端查看这个?
  • 我在 yahoo mail 和 gmail 中测试。
  • 我相信gmail的position: absolute有问题。
  • 如果我是你,我不会使用绝对位置。
  • 以 jpg/png 格式显示您的电子邮件的外观以及您想要实现的目标

标签: html css asp.net email easendmail


【解决方案1】:

电子邮件的CSS support 非常有限,事实上我根本不会使用位置属性。

我也会避免使用 div 来支持表格。电子邮件与网络非常不同,因此您应该先进行一些研究,然后再因无法正常工作而陷入困境。

这里有 3 个资源可以帮助您快速上手:

http://www.reachcustomersonline.com/how-to-code-html-email-newsletters-all-new-version/

http://www.campaignmonitor.com/resources/will-it-work/guidelines/

http://www.sitepoint.com/code-html-email-newsletters/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-11-25
    • 2010-10-25
    • 1970-01-01
    • 2016-11-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多