text-align=center;
should be text-align:center;
You could try margins
(which has greater Compatibility) over left
See Compatibility (and transform
See Compatibility).
margin: 0px auto;
Both of these properties (left
and transform
) lack universal support across the various Email Programs available today (transform
is not supported by ANY email program except for AOL
or Android
).
I would suggest using TABLES
to properly center your content, you'll have greater compatibility across every E-mail application.
HTML
<td class="button__cell">
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="{{ gift_card.url }}" class="button__text">View Gift Card</a>
</td>
</tr>
</table>
</td>
(source: What's the best way to center your HTML ...)
CSS
td.button__cell > table {
margin: 0px auto;
border-collapse: collapse;
border: none;
}
td.button__cell > table > tr {
border: none;
}
td.button__cell > table > tr > td {
text-align: center;
border: none;
}
The CSS3 should remove the borders predefined by browsers and center align the text.