Skip to Content

Flexible radiobutton group

Hi there,

I'm trying to create a radiobutton group layout like below image (Which I have already made, but it seems "hacky". Current solution is made with 16 individual radiobuttons):

I need variable amount of radiobuttons in each line. The important thing is that the layout is aligned on the buttons.

Creating radiobutton groups with one row pr. group produces something like this where only the first buttons line up:

Is there really no way to use one or more radiobutton groups in order to accomplish what I need?

I guess I could accept the somewhat suboptimal way of doing it. However, the customer wants this when a button is selected:

Which requires yet another suboptimal fix (I think adding a custom div element to each non-existing row of button) if I don't have a radiobutton group, in order to color the row blue.

Does anyone know a smart way to do this?

Thank you.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.