How to align 3 fields in a row?

  • shehrijan28
    Asked on May 13, 2022 at 7:03 AM

    How can I align these 3 fields (A, B and phone number) in a row? https://form.jotform.com/221322774911048

  • Ravi_g Jotform Support
    Replied on May 13, 2022 at 8:14 AM

    Hello Shehroz,

    Thanks for reaching out to Jotform Support. Aligning two fields in a row is quite easy. If we shrink both the fields then they will align automatically in a single row.

    1652444043 627e4b8ba47d4  Screenshot 10

    To align 3rd field in the row we have to apply the CSS code for all three fields. In your form the below CSS codes needs to be added to align A,B, Phone Number fields in a single line.

    Cid_32{
    width: 200px;
    }
    Id_33{
    width: 200px;
       margin-left: -100px;

    }
    id_7
     {
       width: 200px;
       margin-left: -10px;
       margin-top: -100px;
    }

    Adding a CSS to your form is easy. Let me show you how:

    • In Form Builder, Click on the paint brush icon on the top right corner of the screen.
    • Go to the Style menu.
    • Scroll down to the end and add above CSS code in the Inject Custom CSS section.
    • After adding the code, Click on Save. 

    uKUVZZrprBslbuRZOkog5qUmFSBxO4LqWkduiRvo Screenshot 21

    We also have a guide about How to Inject Custom CSS Codes that you can check out. Give it a try and let us know how it goes.

    Let us know if there’s anything else we can help you with.

  • shehrijan28
    Replied on May 13, 2022 at 8:25 AM

    Thank You for your response. But this code is not working.

  • Ravi_g Jotform Support
    Replied on May 13, 2022 at 9:15 AM

    Hello Shehroz,

    Thanks for getting back to us. I apologize for the inconvenience this has caused to you. Upon checking your form the codes to reduce the size of the fields are already there but it is not reflecting in the fields. Please replace that code with the below code :

    #id_32 {
        width: 250px!important;
    }
    #id_33{
    width: 250px!important;  
    }
    #id_7{
      width: 250px!important;
    }

     As your 3rd field(Phone number one) is actually a widget then CSS code needs to be added in that widget. I have added the screencast to show how to add CSS in the widget:

    .intl-tel-input.pretty input {
    height: 40px;
    }

    ERJxGjD6mwjcTXTsYEvtv7yh8wdAElLYvoLwLsab Screenshot 10

    Here is the link to my cloned form. If you need to check the settings and the CSS code you can clone my form to check. We also have a guide about How to Clone an Existing Form From a URL that you can check out.

    Give it a try and let us know if you have any other question.