Skip to main content
Level 2
Jun 6, 2022 2:03 AM UTC
Question

How can I change the background colour of a Marketo Form?

Hi I want to change the background colour of a Marketo form that I am embedding via HTML. I have tried add a CSS tag but it just ends up turning the whole page to the background colour. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Darshil_Shah1
Adobe Champion, Community Advisor, UG Leader
Adobe Champion, Community Advisor, UG Leader
Jun 6, 2022 2:41 AM UTC

Well, if you'd like to add background-color to a particular form on the webpage you can add the background-color property to the form element's id, like below:

 

<style> #mktoForm_<form-id> { background-color: yellow; } </style>

 

Also, w/o the URL to the page it's gonna be difficult to debug the CSS.

 

Translate
Dave_Roberts
Level 10
Jun 6, 2022 2:54 PM UTC

If you'd like to be able to style any form that's placed onto the page you could try the following CSS:

 

<style> form.mktoForm { background-color: yellow; } </style>

This will style the form element's background color and should work for any form you place onto the page. In most cases I've seen you'll probably want to add some padding around the form as well so it looks more comfortable atop the background like so:

<style> form.mktoForm { background-color: yellow; padding: 30px 30px 30px 30px; /* top right bottom left */ } </style>
Translate