Design comparison
Solution retrospective
The challenge wasn't super difficult, but I did have problems with getting Javascript to work as well as figuring out what was wrong with my buttons.
Can anyone tell me if there are better ways to center elements? Even now I can't seem to properly center my radios despite everything I've tried.
Community feedback
- @JordanKisielPosted about 2 years ago
You were pretty close to getting the radio inputs where you want them to be. To fix it all you need to do is take the flex-grow property off the label elements selection and for the .radios div add justify-content: space-between.
Essentially what was happening was that the flex-grow property was causing the radios to divide the horizontal space of their container evenly which will override the justify-content property on their container.
In general, flexbox is usually a great way to center things but it can be confusing to understand what the different properties do. This video was a great introduction to the topic for me: https://www.youtube.com/watch?v=tXIhdp5R7sc
Marked as helpful0@jonathon-engPosted about 2 years ago@JordanKisiel omg amazing! I honestly couldn't figure it out and it was driving me nuts. Can't believe it was just a small thing like that. I appreciate the help!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord