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 shrink width of label through CSS?

    Asked by criterions on May 15, 2015 at 03:02 PM

    I have a drop-down with state abbrevs and want to shrink the label width so the spacing on the form looks good. The drop-down portion looks fine, but the label portion of the control takes up too much space.


    I have this working for one control, but wanted to copy it and when I do with width defaults back to the default. I tried doing the same type of custom CSS code, but it isn't working.

    Any ideas?

  • Profile Image

    Answered by Syed on May 15, 2015 at 04:28 PM

    Hi there;

            Could you please try to edit first selector after "/* | *//*__INSPECT_SEPERATOR__*/". Change it to "width: 50px !important;", review the following screenshot, I have cloned your form for this particular thread. Use this CSS code to reduce the width of State label.

    #cid_8,#id_8 {width : 50px !important;}


    I hope this helps. Do let us know if you need further assistance, we would be happy to help you.



  • Profile Image

    Answered by criterions on May 15, 2015 at 04:59 PM

    As usual, you have the answer! Thanks much.

  • Profile Image
    JotForm Support

    Answered by jonathan on May 15, 2015 at 05:52 PM

    On behalf of my colleague, you are quite welcome.

    Contact us again anytime should you need our assistance on JotForm.