Re: Responsive Email - Any way to turn off style auto-correct?

Anonymous
Not applicable

Responsive Email - Any way to turn off style auto-correct?

I need to place a <style> tag with @media queries in the body of my email (for webmail clients) but Marketo is automatically moving it out of the body to the head when I save. Any way to turn this off? 
Tags (1)
13 REPLIES 13
Casey_Grimes
Level 10

Re: Responsive Email - Any way to turn off style auto-correct?

I suppose the larger question is why you would put a style tag in the body of an email--canonically, it should be at the top. If the purpose is to swap out CSS on per-email level, I'd just as soon place a token in the email template itself.
 
Anonymous
Not applicable

Re: Responsive Email - Any way to turn off style auto-correct?

No way to turn it off. AS Courtney says, use a plain text token & put your CSS in there. Then add the Token to the place in the email you want it to be.
Anonymous
Not applicable

Re: Responsive Email - Any way to turn off style auto-correct?

Thanks Courtney and Adam.
Many web email clients strip away the head and everything in it. 
So, if I want my media queries to have any effect at all on these clients, the style tag must be in the body, canonical or not. I'm a long-time designer/developer, but somewhat new to Marketo.
The tokens do sound good. I'll give that a try and post the results soon. 
Thank you both for your responses!
Anonymous
Not applicable

Re: Responsive Email - Any way to turn off style auto-correct?

Which web email clients are you specifically referring to? Gmail?


 
Anonymous
Not applicable

Re: Responsive Email - Any way to turn off style auto-correct?

(removed, please delete)
Anonymous
Not applicable

Re: Responsive Email - Any way to turn off style auto-correct?

First thing, I did try tokens, both plain text and rich text. Both scenarios ended up with the <style> tags stripped out and replaced by comment tags. 
Second, yes, Adam, Gmail is a concern, as is the webmail client I use for work, based on Parallels. There are many others. What I have degrades gracefully, but the point is, it shouldn't have to. 
I don't much like the idea of a software agent making irrevocable decisions about my code without my permission. 
Alok_Ramsisaria
Level 10

Re: Responsive Email - Any way to turn off style auto-correct?

We are using the below mentioned code in email template and did not faced any issues which you have specified, My code is still in body only.
<body>
<style>
@media only screen and (max-width: 640px)
{
*[class].deviceWidth
{
width:440px !important;
}
}
</style>

If you need more help then you can send an email to haris@grazitti.com or reach me at 650-585-6640.
Anonymous
Not applicable

Re: Responsive Email - Any way to turn off style auto-correct?

It may be helpful to clarify that we have been developing the HTML elsewhere and importing it via Email Actions > HTML Tools > Replace HTML. Support has recommended we use Marketo email templates, and we are exploring that now. The ability to use our 3rd-party HTML without modification (other than tokens) is pretty crucial. Stay tuned, and thanks to all commenters.
Casey_Grimes
Level 10

Re: Responsive Email - Any way to turn off style auto-correct?

Two things:
- I don't think I've actually encountered a client where style tags must be rendered in the body, but there's no head tag support: Campaign Monitor seems to agree. In the case of the webmail client you use—which one, in particular, is it? If it's something like Roundcube or Squirrelmail, it may be worth submitting a bug report/patch to the project to add support in the head.
- Depending on how wildly different the emails are, you may be better off making a fully blank template and dumping all body code in via token. If it's somewhat similar, then yes, a template would help.