CSS: Decrease the spacing between two specific questions

  • kcaillouette
    Asked on June 21, 2024 at 10:02 AM

    How do I decrease the spacing between two specific questions, not the whole form?

    The first is a paragraph - I needed to add a link - and the second is a long text.

    CSS: Decrease the spacing between two specific questions Image 1 Screenshot 20

  • Jovito JotForm Support
    Replied on June 21, 2024 at 10:16 AM

    Hi Kathleen,

    Thanks for reaching out to Jotform Support. If you want to adjust the space between the Paragraph field and the Text Area, you need to add the CSS code below:

    /*Adjust the space between two fields - 16141741*/
    div#cid_160 {
      margin-top: -50px !important;
    }
    /*ends here*/

    It is easy to add the CSS code. Let me show you how:

    1. In Form Builder, click Form Designer (blue paintbrush icon).
    2. Go to Styles, then copy and paste the CSS code to the Inject Custom CSS text area.

    CSS: Decrease the spacing between two specific questions Image 1 Screenshot 30

    Here is the result:

    CSS: Decrease the spacing between two specific questions Image 2 Screenshot 41

    You can also check my cloned form as a reference.

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

  • Kathleen Caillouette
    Replied on June 21, 2024 at 10:35 AM

    Didn't seem to work

  • Kate JotForm Support
    Replied on June 21, 2024 at 11:23 AM

    Hi Kathleen,

    You can try again by deleting all the existing CSS and insert this one. Here's how you can do it:

    • In Form Builder, click Form Designer (blue paintbrush icon).
    • Go to Styles, then copy and paste the CSS code to the Inject Custom CSS text area.

    li#id_160 {
     position: relative;
     bottom: 75px;
    }


    Check my screencast below:
    CSS: Decrease the spacing between two specific questions Image 1 Screenshot 20
    Give it a try and let us know how it goes.

 
Your Answer