How to shrink width of label through CSS?

  • Profile Image
    criterions
    Asked 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
    Syed
    Answered 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;}

    http://form.jotformpro.com/form/51345996419972

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

     

    Thankyou,

  • Profile Image
    criterions
    Answered on May 15, 2015 at 04:59 PM

    As usual, you have the answer! Thanks much.

  • Profile Image
    jonathan
    Answered 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.

     

    Cheers!