How to make checkboxes in row without flexbox

hey guys i used flex-direction: column on my checkboxes so the words are under the checkbox. can u guys help me make the checkboxes in rows with the words next to them


Hey,

Do you mean radio buttons?
Remove display:flex , add

.form-group label{
  display:block;
}

Is that what you tried to do?

1 Like

I realise you said “without flexbox” but do you realise you could set the display of the relevant labels to flex to achieve this? Here is how I did it using your project: ta-da

PS sorry if this isn’t helpful.

1 Like

thanks man that helped a lot lol, is it possible for u to explain me why it works tho?

1 Like

If you set the display of anything to flex its children will be displayed in a row unless otherwise specified.
I set the label to flex and so by default its children (the input and number) are displayed in a row. I used a class so no other labels were affected :slight_smile:
You can try setting other things to flex to see what I did, like try setting .form-group to flex and suddenly all the children are in a row and it looks horrible lol.
Hopefully this makes some sense :slight_smile:

1 Like

thanks man great explanation :+1:

1 Like