Search code examples
htmlemailoutlookhtml-email

Align Email Center Outlook


trying to center align my email in Outlook Web Mail, it works great in every other client, gmail, etc even the outlook office app on Mac and PC but for some reason it aligns left in the webmail, tried adding a div align center after the body tag, didn't work either.

This is my setup:

<body align="center" style="background: #E8E8EA; font-family:Arial, Helvetica, sans-serif; font-size:12px; -webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;-webkit-font-smoothing: antialiased; margin: 0 auto;padding: 0;">
<span class="preheader" style="display: none; font-size: 1px; color: #E8E8EA;">Preheader</span>
<table width="100%" cellspacing="0" cellpadding="0" border="0"  style="background:#E8E8EA; margin: 0 auto; text-align:center;">
  <tr>
    <td style="margin: 0 auto; text-align:center;" align="center" width="100%"><table cellspacing="0" cellpadding="0" border="0" style="background:#E8E8EA; margin: 0 auto; min-width:600px;">
        <tr>
          <td class="wrap" align="center" valign="top" style="background:#E8E8EA;" width="100%"><table cellpadding="0" cellspacing="0">
              <tr>
                <td align="center"><a href="[weblink]" style="font-size:9px; font-family:Arial, Helvetica, sans-serif; color:#7f7f81; padding-top: 10px;">View in browser</a></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>

Solution

  • Your code will work well if you simply replace

    min-width:600px; 
    

    with

    width:600px;