views:

45

answers:

2

I normally use CSS rules for "margin:0px auto" along with a 960 container for my standard browser based content. But I'm sorta new to HTML email creation and I've got the following design that I'd like to now center in the browser window without standard CSS.

http://static.helpcurenow.org/mockups/emails/2010/may-survey/survey.html

I seem to recall seeing somewhere that it can also be accomplished by wrapping your email table design in an outer table set to width:100% and using some inline style for text-align:center on the tbody or something like this to do it?

Is there a best practice for this?

Thanks!

+2  A: 

CSS in emails is a pain. You'll probably need tables unfortunately, because CSS is not greatly supported in all email clients.

That said, use an HTML Transitional DOCTYPE, not XHTML, and use <center>.

Seb
A: 

Align the table to center.

<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td align="center">
            Your Content
        </td>
    </tr>
</table>

Where you have "your content" if it is a table, set it to the desired width and you will have centred content.

Shadi Almosri