Reduce Space Between Fields

  • jmartinrise
    Asked on August 11, 2025 at 4:13 PM

    hello, how can i adjust the distance between my label and field so there is less room? using the settings does not work, is there css code you can provide me with?


    Reduce Space Between Fields Image 1 Screenshot 20

  • Aries JotForm Support
    Replied on August 11, 2025 at 4:46 PM

    Hi jmartinrise,

    Thanks for reaching out to Jotform Support. Yes, you can adjust those fields to align to their label by injecting custom CSS codes. Let me show you how to do it with the cloned version of your form:

    1. First, copy this code:

    #input_70,
    input#input_285_full,
    #input_71,
    #input_5,
    #input_122{
      margin-top: -6px !important;
      padding-top: 0 !important;
      /* fallback if margin isn't taking effect: */
      transform: translateY(-2px);
    }

    2. In Form Builder, click on the Paint Roller icon on the right side of the page to open Form Designer.

    3. Now, in the Form Designer menu, click on the Styles tab, scroll down and paste the code into the Inject CSS Code box. That’s it. The code is automatically saved.

    Reduce Space Between Fields Image 1 Screenshot 30

    Here's the sample result after injecting custom CSS codes into my cloned form:

    Reduce Space Between Fields Image 2 Screenshot 41

    Give it a try and let us know how it goes.

  • jmartinrise
    Replied on August 12, 2025 at 11:20 AM

    thanks this would be for all fields on the form please.

  • Mikhail JotForm Support
    Replied on August 12, 2025 at 11:59 AM

    Hi jmartinrise,

    To adjust all fields on your form, replace your current CSS with the code below:

    .form-line {
      margin-top: -6px !important;
      padding-top: 0 !important;
      /* fallback if margin isn't taking effect: */
      transform: translateY(-2px);
    }


    This is what it looks like after adding the CSS code:

    Reduce Space Between Fields Image 1 Screenshot 20

    Give it a try and let us know how it goes.

Your Reply