+1-888-365-2779
Try Now
More in this section

Forums / Designing & Styling / Form elements - checkboxes / radiobuttons

Form elements - checkboxes / radiobuttons

4 posts, 0 answered
  1. Jelle Spaan | RedMatters
    Jelle Spaan | RedMatters avatar
    26 posts
    Registered:
    07 Sep 2010
    16 Feb 2012
    Link to this post
    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
  2. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    21 Feb 2012
    Link to this post
    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
  3. Jelle Spaan | RedMatters
    Jelle Spaan | RedMatters avatar
    26 posts
    Registered:
    07 Sep 2010
    21 Feb 2012
    Link to this post
    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
  4. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    14 Mar 2012
    Link to this post
    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
4 posts, 0 answered