Skip to content Skip to sidebar Skip to footer

Center Div In Microsoft Outlook

I used
to center the container div. In the browser it works, but when I open it in Microsoft Outlook it's not in the center. I

Solution 1:

<div align="center">

your code 

</div>

Only for Outlook


Solution 2:

For emailing in general it is better to do use html attributes and deprecated tags instead of their CSS equivalents because some messaging systems ignore inline styles.

For example, instead of:

<div style="width: 742px; margin: 0px auto; ">...

You can use:

<body align="center"><table align="center" width="742">...

Or

<div align="center">...

Example 2, instead of:

<p style="font-family: Arial, Helvetica, Tahoma, sans-serif;">My text</p>

You can do:

<font face="Arial" size="4">My text</font>

Solution 3:

A good reflex is to go on the official Microsoft Documentation Network: http://msdn.microsoft.com/en-us/library/aa338201.aspx

Here you can see that the best method is to use.. another thing than a div element.

Use a table, it allow the maximum of css control.


Post a Comment for "Center Div In Microsoft Outlook"