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

Anonymous
Not applicable
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
Anonymous
Not applicable
We tried an experiement where we put our custom mobile responsive HTML into a Marketo Template. Test sends from the template stripped out our conditional comments for Outlook, or appeared to. Can't quite tell if the style tags were stripped by Marketo or by the webmail client. But losing the Outlook controls is a deal breaker.
Anonymous
Not applicable

Not sure if this was ever resolved since it was a few months ago, but in order to get MSO conditional tags to work and render, they must be placed in an editable region on the email level. They can not live in the template or Marketo will strip them out upon save. Additionally there has been an update on the platform that now allows conditional statements, I have not tested to see if statements can now reside in a template.

Trish_Voskovitc
Level 5
i have never been able to use an outside product to produce my html and then copy paste into marketo- causes all sorts of havoc. you have to code within marketo directly to not have all sorts or automatic marketo things mess up your code.
Anonymous
Not applicable

We will have to defer exploring whether Marketo templates will allow us to a) import our designed HTML without b) removing style tags from the body (for the benefit of media queries), until next week. Thank you all for the suggestions. The client I'm observing this in is Parallels/Horde, Courtney, but that's not the issue. Standards aren't laws. There should be an expert mode. Thank you!

Casey_Grimes
Level 10
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.
Anonymous
Not applicable
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.
Alok_Ramsisaria
Level 10
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
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. 
Anonymous
Not applicable
(removed, please delete)
Anonymous
Not applicable
Which web email clients are you specifically referring to? Gmail?


 
Anonymous
Not applicable
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
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.
Casey_Grimes
Level 10
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.