Form elements - checkboxes / radiobuttons

Posted by Community Admin on 05-Aug-2018 12:44

Form elements - checkboxes / radiobuttons

All Replies

Posted by Community Admin on 16-Feb-2012 00:00

Hi all,

while styling a form (and looking for a 'best practice' to apply to all the forms on every website we build), I was wondering if someone has a simple, easy way of styling checkbox-lists or radiobutton-lists.

When the inputs and the labels are vertically aligned (as a 'set'), it's almost impossible to keep the input and the label next to eachother, while applying some padding or margin at the bottom. Or maybe someone knows how to do this the easy way.

Wouldn't it be much more obvious to apply a container/parent to them? This container can be positioned inline (to align them horizontally) or as a block (vertically) and/or apply some styling to it, etc.

Thanks for reading. I hope this 'feature request' can be applied in a next release... For now I'm looking forward to any suggestions.

Regards,

Menno-Paul

Posted by Community Admin on 21-Feb-2012 00:00

Hi Menno,

Why would you add only margin-bottom to the radiobuttons or checkboxes? What is the use-case scenario? If you set the same top and bottom margins to those elements you will preserve the proper alignment. By default labels and radiobuttons/checkboxes are aligned at one level, so adding top and bottom margins won't change that.

Regards,
Jen Peleva
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 21-Feb-2012 00:00

Hi Jen,

I think it would be easier. When you try to accomplish some sort of table-layout for your checkbox-/radiobutton-list, why put all elements (inputs and labels) behind each other, while using breaks to create a new row or even columns? It would be a lot easier to just wrap them, and make the styling on the wrapper decide what happens and how thinks are aligned.

Regards,

Menno-Paul

Posted by Community Admin on 14-Mar-2012 00:00

Hi Menno,

If you wrap each checkbox or radiobutton with a wrapper tag, you will generate a big amount of html, which is not a good practice, when you can achieve the same result without additional tags.

All the best,
Jen Peleva
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed