- MeetingHabitsAsked 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!
- JotForm Supportashwin_dAnswered on December 27, 2016 at 11:22 AM
Please inject the following custom css code in form and see if that solves your problem:
width: 120px !important;
The following guide should help you how to inject custom css code in form: https://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes
The output of the above css is:
Hope this helps.
Do get back to us if you have any questions.
- MeetingHabitsAnswered 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?
- IanAnswered 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 :
This should affect all the radio fields on the form.
Let us know if you have more questions.
- MeetingHabitsAnswered on December 27, 2016 at 11:53 AM
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?
P.s. I opened in a new browser so it shouldn'd be the browser cache.
- JotForm SupportMikeAnswered on December 27, 2016 at 12:02 PM
Please try with an !important statement.
width: auto !important;
- MeetingHabitsAnswered on December 27, 2016 at 12:51 PM
Thanks, Mike. That did the trick. You guys rock!