interactive rating component

Solution retrospective
Javascript concept well digested in here. Please leave a remark
Please log in to post a comment
Log in with GitHubCommunity feedback
- @correlucas
👾Hello @Barsheyr, Congratulations on completing this challenge!
Two tips for you:
Fix the alignment. The best way make this alignment is by using
FLEXBOX
. The first step, is to addmin-height: 100vh
to make the body height size becomes 100% of the viewport height, this way you make sure the container will be aligned vertically since thebody
will display ever 100% of the screen height. After that add two flex properties to make the alignmentdisplay: flex
/align-items: center;
/justify-content: center;
. If you're using the attribution you need to addflex-direction: column
to make the attribution stays under the QR Code component. See the code below:body { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.font-medium { display: flex; font-weight: 500; flex-wrap: wrap; }
.font-medium { display: flex; font-weight: 500; flex-wrap: wrap; }
✌️ I hope this helps you and happy coding!
Marked as helpful - @hyrongennike
Hi @Barsheyr,
Congrats on completing the challenge
Just a suggestion, instead of giving 0 when no rating is selected I would suggest just disable the button until a rating is selected this can be done by adding the disabled attribute on the button and removing it when the rating is clicked.
Hope this is helpful.
Marked as helpful
Join 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