CSS to align two fields not working

  • giovanni.pujatti
    Asked on August 13, 2025 at 4:25 AM

    Hi,

    Thank you for your continuous support!
    I'd like the field "same as the main contact email" to look in line with the previous one, like this:


    CSS to align two fields not working Image 1 Screenshot 30

    However it looks like this instead :(

    CSS to align two fields not working Image 2 Screenshot 41

    Here is the wrong .css I used:


    #id_214, #id_216 {

    }

    #id_216 {

    top : 6px !important;

    }

    Maybe you can help fix? ^^'




  • John JotForm Support
    Replied on August 13, 2025 at 4:41 AM

    Hi Giovanni,

    Thanks for reaching out to Jotform Support. You can easily position the check box to be on the same line as email field by Injecting CSS Codes into your form. Let me walk you through it:

    1. First, copy this code:

    /*thread 29994601 - align checkbox to email field*/
    label#label_216 {
        height: 28px;
    }
    @media screen and (max-width: 480px){
    label#label_216 {
        height: unset !important;
    }
    li#id_216 {
        padding-top: 0;
        margin-top: 0;
    }
    }
    /*ends here*/

    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 remove the codes you added for the the Multiple Choice field or check box.

    4. Then, paste the code into the Inject CSS Code box. That’s it. The code is automatically saved.

    CSS to align two fields not working Image 1 Screenshot 20 Give it a try and let us know how it goes.

  • giovanni.pujatti
    Replied on August 13, 2025 at 4:43 AM

    Thanks John,
    it worked perfectly!

Your Reply