I can't center my Html table in Emails.

conflictingcake

New Member
Has anyone ever designed an html newsletter from a simple table
and experienced left alignment and no background color issues when sending it through MSN or Gmail?

Am I missing an important code, or line of css?
Thanks to anyone willing to help me out. :(

HTML:
<html>
<head>
<title>Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" align="center">

<table bgcolor="#fefdf9" width="600" id="Table_01" border="0" cellpadding="0" cellspacing="0"  align="center"  >
<tr>
<td>
<img src="http://advocacynet.org/wordpress-mu/chooson/files/2009/08/black-box2.jpg" alt="" width="600" height="432" border="0"></td>
</tr>


</table>
</body>
</html>
 

conor

New Member
using CSS in emails is always a pain - its supported differently in every email client.

try adding the align centre to the td:

Code:
<td align="center"></td>
 

conflictingcake

New Member
Thanks for the reply.

I don't understand why the contents of my table aren't 600 wide like the table. In Email applications there's a padding around each cell and it won't center.



HTML:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">


</head>

<body>

<table width="600"  cellpadding="0" cellspacing="0" border="0" bgcolor="#000000" align="center" >
        
        <tr>
             <td bgcolor="#555555" width="600" height="100"> </td>
        </tr>
        <tr >
             <td bgcolor="#555555" width="600" height="100"></td>
        </tr>
        <tr>
             <td bgcolor="#555555" width="600" height="100"></td>
        </tr>
        <tr>
             <td bgcolor="#555555" width="600" height="100"></td>
        </tr>

</table>
</body>
</html>


9890.jpg
 

Phreaddee

Super Moderator
Staff member
Gmail is particularly annoying with email templates.
Ive found much to my annoyance and disgust inline styles virtually everywhere is the only way to make it work well in gmail. And even then...
 
Top