In testing the same template with text of a newsletter sent to a Yahoo mail account and to a Gmail account I am finding a frustrating failure of the Gmail newsletter to render the margins. In Yahoo the newsletter is perfectly formatted as intended in my css rules. In Gmail it arrives with the intended text font and other font customizations looking the same as intended, but, the margin-left and margin-right rules are left out causing text in the newsletter mailed to Gmail to run to the edges of the newsletter.
When I look at my template I have this line that gives the TD an ID name that has margin properties attached in the CSS style sheet.
<td id = "contentTextArea" width="600" colspan = "2" >
The same code arrives in YAHOO as ---
<td id="contentTextArea" colspan="2" style="font-family: Arial,Sans-serif,Helvetica; font-size: 12px; color: rgb(153, 153, 153); padding: 0px; margin: 0px;" width="600">
the ContentTextArea triggers an inline style.
But in Gmail it arrives as --
<td colspan="2" style="font-family: Arial,Sans-serif,Helvetica; font-size: 12px; color: rgb(153, 153, 153); padding: 0px; margin: 0px;" width="600">
the ContentTexArea ID is completely missing and the prescribed margin properties are not loaded, causing the text to run into the edges of the newsletter.
Why would ONE test produce two different codes depending on Gmail or Yahoo.
I have gotten this working so that my email newsletter tests render the same in Gmail and Yahoo after trial and many errors-- I have learned that Campaign Monitor's filtering on a template page does not respond to an ID name to trigger inline CSS styles.
My stylesheet #ContentText properties all had to be changed to .ContentText Class properties and the internal <td class="contentTextArea"> instead of <td id="contentTextArea">.
Using class and .thisstyle format in the stylesheet instead of #thisstyle format applied to an ID name triggered Campaign Monitor to apply inline styles correctly. Although I still cannot figure out why the same code was not written when the same email newsletter arrived in a Gmail account that had been sent to a Yahoo account.
Thanks for the messages - Campaign Monitor sends the exact same HTML to Yahoo and Gmail, so if you are seeing differences it is something happening on the Gmail side, not the Campaign Monitor side.
It seems like Gmail is stripping out the ID, in this case, for example.
From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that drive real business results.Get started for free