Community Forum

Over the years we have built up a community of email marketers, coders and designers that live and breathe email.

Use the Email on Acid Forum like your virtual water cooler: Stop by to discuss email code, quirky clients and fixes and post your issues (with an example of the code) for our community to offer its assistance.

 
   
Gmail Style declaration

smarsh

Newbie
Total Posts:  3
Posted: 29 August 2009 07:38 PM

Hi,

My mail got flagged by the Gmail test as <STYLE> declaration not supported in <BODY> tag.

Is there a workaround for this?

Thanks.


 

acidadmin

Avatar
Administrator
Total Posts:  43
Posted: 29 August 2009 10:48 PM
[ # 1 ]

Unfortunately no.  big surprise

Gmail does not support embedded CSS nor any attributes or properties in the body element.  In fact, they pretty much ignore the <body> all together.

If you want to be compliant with Gmail, it’s best to create a wrapper table (or div) around your layout with a width of 100%. It’s also recommended that you use inline styles.

Good luck!


 

smarsh

Newbie
Total Posts:  3
Posted: 30 August 2009 08:30 AM
[ # 2 ]

Thanks for the answer.

Despite the error, everything rendered fairly well. Is it asking for trouble to ignore the error and leave things as is?


 

acidadmin

Avatar
Administrator
Total Posts:  43
Posted: 30 August 2009 11:23 AM
[ # 3 ]

One of the benefits of our test results is that we highlight exactly which lines of code are not supported by each email client.  If we didn’t highlight it, you wouldn’t know that it wasn’t supported.

I think the term “error” is what is throwing you off.  Even though you may find “errors,” as long as you are happy with the way your design is rendering, there is no cause for concern.  Maybe we should consider redefining unsupported code as “discrepancies.”

From a programming standpoint however, there is no way for us to know what an end user feels is an acceptable vs an unacceptable discrepancy.

Are you concerned that if you show this acid test to a customer, they might think there are several errors?  One feature we hope to build soon is the ability to forward the test result to a friend or customer for approval.  In that scenario, we would not include the code analysis.

Thanks so much for the feedback and the open dialog!


 

smarsh

Newbie
Total Posts:  3
Posted: 30 August 2009 12:23 PM
[ # 4 ]

I guess the term “error” was concerning me a bit. I realize that some e-mail clients are better at rendering than others, but just wanted to be sure that I’m not naive in thinking if it looks good, it’s fine. Thanks for the clarification.

Am I right to believe that once you go beyond very basic HTML e-mail, one or another e-mail client will “dislike” something used to achieve the layout, or is it possible to have a more elaborate layout and make evryone happy?

Right now I’m not concerned with showing someone else - it’s an internal newsletter I’m working on. In the future, that would be a nice feature.

Thanks.


 

Michelle Klann

Avatar
Administrator
Total Posts:  204
Posted: 22 September 2009 09:38 AM
[ # 5 ]

This just in! 

G-mail now supports the body tag to some degree.  Instead of having 2 bodies in the Gmail result screen, it converts your body to a div. 

Therefore some of the standard BODY attributes are not supported such as alink, background, bgcolor, leftmargin, marginheight, ect. 

BUT inline styles are supported, for example:
<body style=“background-color: black;”>

will get converted to:
<div style=“background-color: black;”>


 

Joyce21

Newbie
Total Posts:  1
Posted: 29 September 2009 08:11 PM
[ # 6 ]

I agree with it..Google cannot support CSS..In fact, they pretty much ignore the <body> all together.

Regards

Joyce

_____
simulation de pret