Drop-down width

  • blenheimconvention
    Asked on April 22, 2015 at 7: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

    Jotform Thread 556829 Screenshot
  • bokid
    Replied on April 22, 2015 at 9: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.

    Drop down width Image 1 Screenshot 20

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

  • blenheimconvention
    Replied on April 22, 2015 at 5:24 PM

    Thanks a bunch bokid, that worked perfectly!

    Really appreciate your help.

  • bokid
    Replied on April 22, 2015 at 5:38 PM

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

    With kind regards,

    Boki.