How To Style A Marketo Form Like A Pro


Marketo offers 7 themes that you can use for your forms, but what if you want your form to match your branding? You can add your own CSS style to match your brand, however, this is very difficult because Marketo adds their own CSS classes and inline CSS. Here is how you can style your Marketo form like a pro.

Adding Custom CSS

Before we dive into some tips and examples, it’s important to know how to update the custom CSS within Marketo. Navigate to the form and open up the form editor. Click on Form Settings > Form Theme > Edit Custom CSS this is where you can paste in your own CSS.


Choosing a default theme

Marketo requires that you select one of their themes to start. Changing themes will affect the CSS as well as the structure of the HTML. For this tutorial, I will be using the “simple” theme which is the default theme when you create a new form.


Form Preview

Here’s what the form looks like with the default Marketo styling.


The structure of a Marketo form

The typical HTML stucture for a text field in Marketo looks like this:

Almost all of the classes you see already have CSS properties attached to them, so in order to use your own styling within the form all those CSS properties need to be overridden with new ones.

Unbold the Label

By default, any fields that are marked as “required” will have labels that are bold. To override this you can add this piece of code.


Responsive form fields

Field widths are set to a fixed width, to override the set field widths you can add a percentage width like this.

The mktoOffset

Above each form field there is a div with the class of mktoOffset. This DIV is used to control the vertical spacing of the form fields. The default CSS looks like this.

You can override the height and width by using this CSS

Center the Submit Button

The submit button is wrapped in a SPAN with an inline CSS style for margin-left. In order to center the submit button, the first thing you need to do is override the margin-left property and set it to 0px.

The submit button is also wrapped in a DIV with the class named mktoButtonRow. There is a CSS property to align the text to the left, so we need to override that and change it to CENTER. There is also no width on the DIV, so a width will need to be added.

Change the Button Style

To change the button style to match you brand, you will need to override the properties for .mktoForm .mktoButtonWrap.mktoSimple .mktoButton. Here are some examples of what that would look like

Full Width Button

Change the button background color

Remove the border from the button

Add padding to the button

Change the font size of the button

Fixing the radio buttons and checkboxes

If you have chosen to have the Marketo labels “above the form” instead of “to the left”, you might encounter an issue with the label for the radio buttons and checkboxes showing below the label.


Add this CSS code to put the label and the checkbox/radio button beside each other.



Email me, send me a tweet @jennamolby, or leave a comment

Related Posts

  • 23/09/2020
    7 Ways Pardot Users Can Use Chrome Developer Tools For Troubleshooting & Testing

    Chrome Developer Tools is widely used by developers to help edit pages on-the-fly and diagnose issues. Pardot users can use DevTools to troubleshoot and test landing pages and forms. In this post, I’ll show you 7 ways you can use DevTools, including how to identify errors on a landing page, how to customize the CSS of a form and how to view hidden form field values.

  • 29/07/2020
    How to Create an Engagement Program to Automate Sales Follow Up in Pardot

    Your event or webinar has finished and now it’s time for Sales to follow up on those leads. A great way to automate Sales follow up is to create an automated engagement program in Pardot to send out emails on the Sales Rep’s behalf and create follow up tasks automatically in Salesforce.

  • 23/07/2020
    How to Add an Opt-in Message & Privacy Policy Message to Pardot Forms

    GDPR and CASL compliance are just a few reasons to add an explicit opt-in message or a privacy policy to your Pardot forms. In this post, I’ll show you how to add a custom opt-in message to your form and a privacy consent message above the form submit button.

16 comment(s)
  • Brie Edmonds

    25/09/2017 at 1:43 pm

    This has been by far been one of the best tools I have been able to use to fake my way through Marketo. I am making it because of you and your easy to understand instructions on how to make things great. Thank you soo much!

  • Zofia Szyszka

    31/08/2017 at 7:13 pm

    Hey Jenna, great article! Thank you, it helped me a lot! The only thing I can't seem to be able to target now are the rounded corners on a select box! So frustrating... Would you know how to make them square? Thanks! Zofia

    • Jenna Molby
      to Zofia Szyszka

      01/09/2017 at 9:34 am

      Hi Zofia, Add this CSS to make the corners for a select box square. select {-webkit-appearance: none; -webkit-border-radius: 0px;}

  • Jacob Brissee

    10/08/2017 at 7:54 pm

    This is interesting but I have an even more basic question: How do I get forms to center? I'm using a guided landing page template and the widget is wider than the form. I assume I can 100% it and margin:auto but I don't know what class to reference.

    • Jenna Molby
      to Jacob Brissee

      11/08/2017 at 9:12 am

      Hi Jacob, You can reference the 'mktoForm' class like this form.mktoForm {margin-left:auto;margin-right:auto;}

  • Natasha M.

    06/03/2017 at 11:26 am

    Hi , This post is very useful .I just had a question about the checkbox CSS .How can i have the checkbox to the left and label of the checkbox to the the right .

  • Mike Sherwood

    29/12/2016 at 11:44 am

    This is really great. Thanks. Two questions: 1. It seems half the battle is finding out which classes to change. There is no documentation as far as I can see. How do you go about discovering the class names to select? 2. This is a pure css question. What is the difference between having a space between the class names and not? For example, the difference between this: .mktoButtonWrap.mktoSimple (no space between) and .mktoButtonWrap .mktoSimple (with space between) How are those different? thx, Mike

    • Jenna Molby
      to Mike Sherwood

      29/12/2016 at 12:18 pm

      Hi Mike, so happy you found the post useful! I use Chrome DevTools to figure out which classes need be changed. You can find info on how to use Chrome DevTools here: Without a space in a CSS selector, it's just like it's one class, when you have a space the CSS is applied in a hierarchy such that it looks for mktoSimple within the children of elements with mktoButtonWrap.

Leave A Comment

Your email address will not be published. Required fields are marked *

About Me

Welcome to my blog, where I share, tips, tricks, thoughts and solutions that I learn in my daily life as a Marketing Operations leader.

Most Commented
Popular Posts