How to make radio items match width of their labels

  • Profile Image
    Asked on December 27, 2016 at 11:04 AM


    I searched the form and tried the CSS editor for a while with no luck.  How can i make the width of my radio-items auto-adjust to match the size of the label.  See attached. 

    Thanks a ton!

  • Profile Image
    Answered on December 27, 2016 at 11:22 AM

    Hello MeetingHabits,

    Please inject the following custom css code in form and see if that solves your problem:

    span.form-radio-item {

        width: 120px !important;


    The following guide should help you how to inject custom css code in form: 

    The output of the above css is:


    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • Profile Image
    Answered on December 27, 2016 at 11:32 AM

    Hi Ashwin, Thanks for the quick answer.  Unfortunately, that doesn't work (it then screws up other fields (image below).

    Is there any way to make the widths auto-adjust to the text?  

    If not, is there code I can use to set sizes for individual items? 




  • Profile Image
    Answered on December 27, 2016 at 11:33 AM

    Apart from what my colleague suggested, there is one more way to achieve this.

    As it appears to me that you are not looking for fix width of the radio fields so you can also opt to paste the following code in the INJECT CSS section :

    width: auto;
    padding-right: 15px;

    This should affect all the radio fields on the form.

    Let us know if you have more questions.

  • Profile Image
    Answered on December 27, 2016 at 11:53 AM

    Hi Ian, 

    Thanks for chiming in!!!  I've injected the CSS.  It looks great in the Advanced CSS editor preview but that doesn't carry over to the live form.  Any ideas? 

    As an FYI - i'm planning to eventually embed into a webpage using your embed code (the first option with javascript code). 

    Thanks again!

    P.s. I opened in a new browser so it shouldn'd be the browser cache. 

  • Profile Image
    Answered on December 27, 2016 at 12:02 PM

    Please try with an !important statement.

    width: auto !important;
    padding-right: 15px;

    Thank you.

  • Profile Image
    Answered on December 27, 2016 at 12:51 PM

    Thanks, Mike.  That did the trick.  You guys rock!