Forms 2.0 Question - Spacing Between Fields

Highlighted
Level 2

Forms 2.0 Question - Spacing Between Fields

Does anyone know how to decrease the vertical space between fields in a form?
Thanks in advance
Paul Green
Tags (1)
6 REPLIES 6
Highlighted
Anonymous
Not applicable

Re: Forms 2.0 Question - Spacing Between Fields

Paul,

You can customize the CSS of the form layout to make it look how you want. Look into setting the margin or padding properties.
Highlighted
Anonymous
Not applicable

Re: Forms 2.0 Question - Spacing Between Fields

I've tried using margin, padding, and even line-height properties to the form, label, and input elements - to no avail.
Highlighted
Level 3

Re: Forms 2.0 Question - Spacing Between Fields

For fields that are not required try this:
  1. Go to the rich text editor for the label name.
  2. When it opens, press space bar, then SHIFT+ENTER, and enter your label.
  3. You can change the pixel height of the blank line to fiddle with how much vertical space you need. 
Doesn't work for required fields because the red asterisk appears in the line space.
Highlighted
Level 3

Re: Forms 2.0 Question - Spacing Between Fields

In reference to a previous discussion that Jason was in, which worked for me. https://community.marketo.com/MarketoDiscussionDetail?id=90650000000PlZdAAK 
Highlighted

Re: Forms 2.0 Question - Spacing Between Fields

Help! I'm also desperately looking for a way to minimize the whitespaces between all fields! (in height)
Highlighted
Level 2

Re: Forms 2.0 Question - Spacing Between Fields

Very old thread, but for people still searching how to do this, here it is:

If you have no experience editing the CSS of Marketo forms, follow these steps. If you know what this is, just use the css below.

  1. On the "Form Theme" page of the form editor, click the gear icon to the far right and select "Edit Custom CSS."Edit Custom  CSS - Screenshot.JPG
  2. Copy and past the following code:
    .mktoForm .mktoOffset {
          float: left !important;
          height:0px !important;
    }


This will remove all vertical space between the fields. If you would like some space, just change the the height from "0px" to what ever you'd like. Personally I recommend 5px.

Hope this helps someone!