Div样式在Outlook电子邮件中不起作用 [英] Div styles not working in Outlook Emails

查看:626
本文介绍了Div样式在Outlook电子邮件中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Div标签为电子邮件创建了一个HTML模板。



它在Gmail,Yahoo上工作正常。



以下是我使用的代码。

 < div style =margin:auto; padding:auto; background-color:#FFFFFF; width:600px; border:0px;> 
测试电子邮件
< / div>

我已设置 div 宽度600px也使边距和填充自动。所以它会显示在屏幕的中心。



但它不能像这样。



Gmail ,雅虎在屏幕中央显示电子邮件



请建议我如何解决这个问题。

解决方案

浮动宽度和位置应用于div的CSS样式在Outlook中不起作用。



https://www.campaignmonitor.com/blog/post/3472/div-tags-in-html-email-newsletters/ (见下半部分)



这是在电子邮件中仍然使用表格的主要原因。


I have created a HTML template for Emails using Div tags.

Its working fine on Gmail, Yahoo.

But Div styles not working in the Outlook.

Following is the code which i have used.

<div style="margin:auto;padding:auto;background-color:#FFFFFF;width:600px;border:0px;">
Testing Email
</div>

I have set div width 600px also make margin and padding auto. so that it will display in the center of the screen.

But its not working like that.

Gmail, Yahoo display email in the center of the screen

Please suggest how can i reslove this issue.

解决方案

Float width and position CSS styles applied to div's do not work in Outlook.

https://www.campaignmonitor.com/blog/post/3472/div-tags-in-html-email-newsletters/ (See table half way down)

This is the primary reason while Tables are still used so heavily in Emails.

这篇关于Div样式在Outlook电子邮件中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆