How to Give Padding and Margin to Gravity Forms

by | Last updated Mar 11, 2025 | Gravity forms, Styles & Layouts | 0 comments

Introduction

If your form fields appear too close to the form border or the form container doesn’t have any space surrounding it then you should give padding or margin to it. Here I will give you a quick summary of margin and padding so that you get the full grasp of what we are going to achieve in this article.

Structure of CSS box model in simpal visuals.

Margin is the distance of the form’s container from its immediate outer element. It will add space around the form container. You can give margins for the top, right, bottom, and left sides.

Padding is the distance of form elements from its container. It will add space inside the form container. You can give padding for the top, right, bottom, and left sides.

So, padding acts on the inside, and margin acts on the outside. You can read more about margins and paddings from w3schools. Recently I have also published tutorials for changing the background color and font family.

By the end of this step-by-step tutorial you will be able to set margin and padding for these different parts of the form:

  • Form Wrapper
  • Form Header
  • Form Title & Description
  • Field Labels
  • Sub Labels
  • Field Description
  • Text Fields
  • Dropdown Fields,
  • Radio Inputs
  • Checkbox Inputs
  • Paragraph Textarea Fields
  • Section Break Title & Description
  • List Field
  • Submit Button
  • Confirmation Message
  • Error Message

Steps to Set Margin and Padding Using Gravity Booster

Margin and padding act on almost all the different parts of the Gravity Forms. Gravity Booster is a free plugin for Gravity Forms that lets you design your forms without coding. The design works on all themes and page builders like Divi, Elementor, WPBakery, Beaver Builder, etc. Follow the steps mentioned below to set the margin and padding using Gravity Booster.

How to Give Padding and Margin to Gravity Forms
  • Login inside your WordPress dashboard and search for Gravity Booster under Plugins -> Add New. Install and activate the plugin.
  • Now go to Forms -> Gravity Booster menu item. Here select the form in which you want to set margin and padding. 
  • After selecting the form the page will auto-reload with the form design settings on the left sidebar and preview on the right side. The design settings are divided into multiple sections like Form Wrapper, Form Header, Form Title and Description, etc. Each of these sections has built-in controls for setting margins and padding.
  • Let’s navigate to the Form Wrapper section and scroll the settings sidebar to the bottom to find the margin and padding settings.
  • The margin and padding settings let you set one value for all four sides or you can also give separate values for the top, right, bottom, and left side. You can add the values in px, em, rem, or percentage. You can also use the slider to change the values using the mouse.

Steps to Separate Margin & Padding for Different Sides

If you add a value inside the margin or padding input box then it automatically applies the same value to all four sides. To unlock the separate controls for each side you need to click on the link icon present on the ride-hand side.

margin and padding controls for Gravity forms

Clicking on the icon will show all four controls for the sides. There will also be a visual representation next to each control highlighting the side that will be affected by this control.

Saving Margin & Padding Settings

All the design changes you make are a live preview in the Gravity Booster itself. So, once you have set the margin and padding for all the different sections of the form and are happy with the changes then it’s time to save them.

The settings can be saved by simply clicking on the Save button present at the top right corner. If you don’t save your changes then they won’t show in the frontend where your form is embedded.

Steps to Set Margin and Padding using Custom CSS

If you are looking to set margin and padding using custom CSS then use the following codes. Each code is meant for a separate section of the form so, you can use them as you see fit for your design requirements.

Note: Change the Form_ID to your actual form id otherwise the code won’t work.

Still stuck? Need custom solution? We can help

Save me hours of work

I was skeptical to download…how can it be that easy? But, it was and it truly saved me hours of work to style my Gravity Forms.

Great stuff!

I rarely take the time to leave reviews.
With this one I felt compelled because it is so good!

great!

works great! should be in the gravity basic installation…

Just right!

Outstanding! Does just what I wanted.

Excellent plugin

Makes the job of styling forms so much easier.

I love it

Easy and efficient plugin !

Easy to use and powerful

Recommend this to anyone struggling to format their forms

Perfect

It works perfectly. I am satisfied. Congratulations!

Very good and beautiful

It worked very good used with divi theme, popup builder and gravity forms!
CongraTulations!

Very Useful

Instead of playing with the style sheets, you can make all the changes directly here.

Should be default Gravity Forms functionality

Great plugin. My go to solution for Gravity Forms styling.

A great find!

This plugin enabled me to exactly what I wanted to with my forms and they look great! It would have been much more painful to customize my forms without it.

Very Helpful!

Gravity forms are awesome, but notoriously difficult to style. I was struggling for hours to reduce the space between a field, let alone tweak size, color, etc. This plugin is exactly what I was looking for – well done!

Excellent plugin

Easy and intuitive to use and helps to accelerate workflow.

great plugin – easy to use

this plug in was exactly what i needed to help finish the layout of my page.

I love it!

Exactly what I was looking for

I don’t know CSS and was asked to make very specific changes to our Gravity Forms. This did the trick and this tool gave me the flexibility I needed.

It is a amazing gravity form plugin that I was looking for long time.Thanks

Thanks for helping for designing gravity form such an amazing way.

Just what I needed!

Love love love this plugin. Who wants to spend hours using css to style a form?
Not me! I can get my forms looking exactly as I want them to in just a few clicks.

Great work!

Thank you guys! extremely helpful!

Very convenient, works great!

I’ve had a need to sometimes change the style of Gravity Forms, and this saves time so I don’t have to figure out the CSS styles and manually override them 😉

Great Plugin

This plugin is a perfect complement to style Gravity-Forms. The intuitive user interface, integrated into the Customizer, is very well done. PERFECT!!! THANK YOU!!!

Much better than forms that come with the themes

Solid plugin, much better than the forms that come with the themes. We’ve used GF to create membership and donation forms, which our clients love. I thought GF was a little pricey but it’s paid for itself in customer satisfaction.

Good Plugin

A bit of a learning curve for this old woman, but does what I need it to do!!

Huge time saver

You can accomplish what this plugin does using CSS yourself, but the plugin saves you the time of doing so. This is a simple, effective and efficient way of making your GF look better.

Super Awesome and Easy to Use

Really great plug in that is so easy and simple to use! Thank you for your awesome work!

Great Plugin Essential!

Very easy to use, exactly what I needed for Gravity Forms!

Fantastic plugin!

This plugin saved me hours of work. I am not well versed in coding by hand and now I don’t have to figure it out. I styled my Gravity Forms beautifully, the easy way. Worked perfectly. Thank you.

Excellent

Makes styling Gravity Forms EASY.

Great Gravity plugin

This is great for all those styling problems that can arise. Easy to use with a gentle learning curve.

It Works Perfectly

If you need to give your form a bit of style, this plugin is perfect and easy to use.

Exactly what Gravtiy Forms missed

I use it on every page – that should say it all.

Works Great for Me

This app is easy to understand and use and works great for me.

0 Comments

Submit a Comment

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