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

    Drop-down width

    Asked by blenheimconvention on April 22, 2015 at 07:10 AM

    Hi, I am trying to set the width of a drop-down by injecting CSS. I would like the width of all the dropdowns to only be the width of the values, which are 1 through 6. I've tried a few snippets of custom CSS now but the drop-downs will always revert to the width of the actual form which just looks odd.

    The form I am using is http://form.jotform.co/form/50852521788866 

    Any help would be appreciated.

    Thanks

    Screenshot
    JotForm thanks dropdowns all
  • Profile Image

    Answered by bokid on April 22, 2015 at 09:55 AM

    Hello blenheimconvention.

    It seems that these double entries of your custom CSS are causing your drop-downs to appear so wide:

    [data-type="control_dropdown"] .form-dropdown {
        width: 100% !important;
        max-width: 650px;
    }


    [data-type="control_dropdown"] .form-dropdown {
        width: 100% !important;
        max-width: 650px;
    }

    If you replace both of these bold entries with width: 9em !important; your drop-downs should be only as wide as it takes to display their inner text.

    Please let me know if you need any help with this.

  • Profile Image

    Answered by blenheimconvention on April 22, 2015 at 05:24 PM

    Thanks a bunch bokid, that worked perfectly!

    Really appreciate your help.

  • Profile Image

    Answered by bokid on April 22, 2015 at 05:38 PM

    You are welcome, I'm very glad that it helped.

    With kind regards,

    Boki.