如何发送一封与 Outlook 中的内容完全相同的电子邮件,表达我在网络浏览器中看到的内容?

发布于 2024-12-06 15:12:48 字数 459 浏览 13 评论 0原文

在我的网络浏览器中,这显示正确。但是,当我将其发送到 Gmail 或 Outlook 时,它无法正确显示,也无法在居中对齐布局中显示。 (我收到的许多其他时事通讯都恰好位于中心)。

要发送的 HTML:

<form target="theFrame" >
<DIV class=contents style="width:527px;">
   <DIV class=contents_body style="padding-left:150px;">
          Why you are not padding, in Outlook? And showing full texts in 100% width?
   </DIV>
</DIV>
</form>
<iframe name='theFrame'></iframe>

In my web browser this shows correctly. But when i send it to Gmail or Outlook it does not show correctly nor it show in the center alignment layouts. (many other newsletter i receive they fit it exactly in the center).

HTML to send:

<form target="theFrame" >
<DIV class=contents style="width:527px;">
   <DIV class=contents_body style="padding-left:150px;">
          Why you are not padding, in Outlook? And showing full texts in 100% width?
   </DIV>
</DIV>
</form>
<iframe name='theFrame'></iframe>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

掀纱窥君容 2024-12-13 15:12:48

这是因为电子邮件客户端基于旧版本的 html,并且不会像浏览器一样呈现。

如果您查看过在线服务,例如 Acid 或 Litmus 上的电子邮件,您可以在发送之前测试您的电子邮件在各种电子邮件客户端中的外观。

保持您的电子邮件模板基本并喜欢旧式的表格布局。

间隔图像怎么样?

<DIV class=contents style="width:527px;">
   <img src="yoururl/img/spacer.gif" width="150px" align="left" />
   <DIV class=contents_body style="padding-left:150px;">
          Why you are not padding, in Outlook? And showing full texts in 100% width?
   </DIV>
</DIV>

This is because email clients are based on older versions of html and will not render the same as a browser.

If you have a look at online services such as email on acid or litmus you can test how your email will look in various email clients prior to sending.

Keep your email template basic and favour old style table layouts.

How about a spacer image?

<DIV class=contents style="width:527px;">
   <img src="yoururl/img/spacer.gif" width="150px" align="left" />
   <DIV class=contents_body style="padding-left:150px;">
          Why you are not padding, in Outlook? And showing full texts in 100% width?
   </DIV>
</DIV>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文