Div styles not working in Outlook Emails

2019-01-18 13:04发布

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.

2条回答
祖国的老花朵
2楼-- · 2019-01-18 13:34

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

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

查看更多
欢心
3楼-- · 2019-01-18 13:46

I would suggest you to make basic html structure using a table tag.

You can then use "div" tags insde "td" tags.

Email templates are a pain because most of the cool stuf doesn't work :D

查看更多
登录 后发表回答