Set background-image parameter at BODY tag | Community
Skip to main content

5 replies

New Participant
February 7, 2020
No text available
February 12, 2015
You can use CSS in the head to effect the body tag. You can use a token in the head. 

<style type="text/css">
body{
background-image: url(http://yourcompany.com/images/background-{{my.Background}}.jpg);
}
</style>

Ok. Don't copy & paste that, cause I just typed it free-hand & there are probably some issues with the way I wrote it, but that's the basic premise. I would put in the vast majority of the URL itself into the template header. Then use really simple terms for the token "Background". Like - finance, travel, healthcare

That should work just fine. 

If not you can definitely add a token to use an external css file. Put the entire CSS url into a plain text token & it will be fine.
Justin_Cooperm2
New Participant
February 12, 2015
We're going to add all the relevant background attributes.
February 12, 2015
@Adam

I think Marketo token can not effect body tag.
Please, teach me your solution using a token.
February 11, 2015
Use a token!