How can I change the background colour of a Marketo Form? | Community
Skip to main content
New Participant
June 6, 2022
Question

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

  • June 6, 2022
  • 2 replies
  • 2041 views

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

Dave_Roberts
New Participant
June 6, 2022

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>
Darshil_Shah1
Community Manager
June 6, 2022

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.