5
votes

I have a problem with the font color of the second email sent to a gmail address. I have the following syntax:

<p style="color:white">Dear Sir/Madam</p>

But in the next email, it adds a new span around the text forbidding me to control the style:

<p style="color:white"><span class="im">Dear Sir/Madam</span></p>

The problem is similar to the following question: Font Color in HTML Email - Gmail

However, in my case it is adding a span instead of just adding a class and therefore forbidding from adjusting the color. I tried using a different color (#FFFFFE) as well as !important but didn't solve the issue. As far as I know, CSS3 won't assist me as well since most things are not allowed in gmail.

How can I avoid having this span in my emails?

Edit: Attached an image that shows the color was overridden through !important but still appears purple. Color was overridden

1
Even if it adds span,color style should be applied. Or you can try .removeClass(); to remove class of span. jsfiddle.net/oockoqyz/1Richa
The question is for HTML emails. Most email clients do not support JS and therefore I cannot use it. Email clients also render HTML differently and so it ignores some of the known rules (That is why i am using inline). Attached is an image shows that the color was truly overridden but still appears purple.Sami

1 Answers

2
votes

using inline styles, other styles are not accepted if more simply