Design comparison
Solution retrospective
Failed at the javascript part, do not know how to automatically deselect one rating when a new one is pushed.
Community feedback
- @justine-135Posted over 1 year ago
It would be efficient if you loop all the buttons from their parent container on your script instead of manually selecting all individual buttons.
At deselecting a button, you can set an initial boolean variable to each buttons then check if their value is true or not. If true ? highlight the button else : remove highlight.
I suggest putting your main-container inside a parent container, and styling it to full height of the screen, and adding flex to your main container to align it to the center of the screen.
I hope my feedback is helpful!
Marked as helpful1
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