What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How to decrease the space between two fields on the same line Using CSS

    Asked by SteveSoler on September 23, 2014 at 11:02 PM

    When using the Shrink option on two fields to place them side by side on one line, is there any CSS that will allow us to decrease the space between the two fields to bring them closer to each other?

    I'm thinking about doing this on a new form I'm creating called Contact Us. I want to bring the City and State fields closer together. 

    Thanks.

    same line same new form shrink thanks side by side
  • Profile Image
    JotForm Support

    Answered by TitusN on September 24, 2014 at 03:55 AM

    Hello, 

    I'm pretty sure you are referring to this form: http://www.jotform.us/42658471433155

    Yes - you can reduce the padding CSS property which is responsible for pushing the two fields apart: 

    To do that - you need to add some CSS to your form using this guide: http://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes

    You can use the CSS below to reduce the spacing between the two fields - feel free to play around with the px value (highlighted green) to adjust the distance between the fields. 

    /*Reduce the left padding of the State Field*/

    li#id_13 {

    padding-left: 0px;

    }

    /*Reduce the right padding of the Country Field*/

    li#id_4 {

    padding-right: 5px;

    }

    Did that help? 

    Let us know. 

  • Profile Image

    Answered by SteveSoler on September 24, 2014 at 05:49 AM

    Worked great! Thanks!