Remove top spacing of short text element.

  • rossyellin
    Asked on September 13, 2024 at 10:46 AM

    How do I remove the spacing above the textbox that I highlighted in green though CSS. I only want to remove the spacing or this question.

    I choose to do custom CSS as opposed to adding the built in "Add another option" to my multiple choice question because I want to require an answer for the multiple choice question but not require the survey taker to enter a response in the "Add another option" text box.


    Remove top spacing of short text element Screenshot 20

  • Sidharth JotForm Support
    Replied on September 13, 2024 at 11:27 AM

    Hi rossyellin,

    Thanks for reaching out to Jotform Support. The space is for the short text label which you can customize it with the help of CSS code. Let me show you how:

    1. Copy the CSS codes below.

    /*Hide the label space of the short text element*/
    label#label_88 {
        display: none;
    }

    2. In Form Builder, click on the Paint Roller icon at the top right corner.

    3. Click on the Styles tab.

    4. Scroll down to the Inject Custom CSS section, and paste the CSS code:

    Remove top spacing of short text element Screenshot 30

    That's it. Check out the screenshot below to see the result:

    Remove top spacing of short text element Screenshot 41

    You might also want to check out this guide about How to Inject Custom CSS Codes.

    Give it a try and reach out again if you have any other questions.

  • rossyellin
    Replied on September 13, 2024 at 11:37 AM

    Thank you for your prompt response. This worked but not I want to know if there a way to either remove the blue background that appears when the user selects a response or include the textbox that says "Feel free to add another option" in the blue background. I want this to feel like this is part of the same question.

    I am also open to another work arounds that you can think of



    Remove top spacing of short text element Screenshot 20

  • Sidharth JotForm Support
    Replied on September 13, 2024 at 12:07 PM

    Hi rossyellin,

    Would you like to remove the highlighting background color that is shown when you select any option in the multiple-choice element shown in the below screencast:

    Remove top spacing of short text element Screenshot 20

    If so, you can add the CSS codes below:

    .form-line-active {
      background: transparent !important;
    }

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

Your Answer