How do I get around the fact that Gmail does not support embedded CSS?


One way to get around this issue is to convert your embedded CSS into inline using our CSS conversion tool in the “Developer Tools” dropdown in each test result.

There is another way of getting around the issue for things like font, font color and font size: Gmail converts your Body tag to a DIV.  That can actually work to your advantage because you can use any inline CSS properties within your BODY that would otherwise be supported by a DIV.  It is important to know, however, that some clients do not support the BODY tag so you should also include the same declarations within your embedded CSS.  Also, keep in mind, you can’t rely on BODY attributes like “bgcolor” because it is not supported within a DIV.

<head>
<
style type=“text/css”>
/*This is for all clients except Gmail, Gmail gets the same declarations from the body tag */
table, tr, td, p, span {font-family:Arial, Helvetica, sans-serif; color:#333; font-size:11px;}
style>
head>
<
body style=“margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; color:#333; font-size:11px;”>
Content
body>

  • 50 Users Found This Useful
Was this answer helpful?

Related Articles

Gmail is converting my email addresses to links.

Yes, if you have an email address listed without a link, Gmail will add it for you.  For...

How do I create dynamic urls using field names?

To view all variable names you can use for fields within the system go to Forms - Fields Manager....

I am trying to save but the save button isnt working

The most common reason for the save not saving is because on the top part of your page "Message...

I am using a small font and my line spacing is all screwed up.

This is because of the Gmail DOCTYPE, try putting your font inside a paragraph tag instead of...

My vertical spacing is not showing up.

Gmail converts this: <td style=“height: 20px;”>td> To this:...