Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Interactive rating component using HTML, CSS and vanilla JavaScript

Vernacci 70

@Vernacci

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Not sure how can i activate one button at a time. Would really appreciate feedback about code readability and best practices.

Community feedback

Yokke 640

@Jexinte

Posted

Hello @Vernacci,

Good job on this one.

When you need to just allow the selection of one button you can use the :focus property it's very useful especially in this challenge.

Then in js when you have checked which button have been selected you just call the property :focus with the class that you named it.

More details here : https://developer.mozilla.org/en-US/docs/Web/CSS/:focus

In hope it helps !

Marked as helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

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