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 built with CSS and vanilla JS

@xdelmo

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


Hi guys,

I hope you're all doing well.

This is my first submission for HTML and CSS as a newbie. I don't know a thing about Javascript but I finally found a solution to use a radio input value as a variable in the second card.

Thanks for reading :)

Community feedback

@najeeb-anwari

Posted

Hello Emanuele, I hope this is helpful for you. Your design is not bad but try to fix these issues:

  • Move attribution to footer tag to make it more semantic.
  • Don't Use back ticks in your html only use that in JavaScript that is why you have 4 HTML validation errors.
  • On 375px screen size the rating buttons wraps to next line don't use wrap flex because it doesn't match the required design.
  • Try to use mobile first design approach. First design it for mobile size than if required change the content size.
  • The active state of the button is not working. The possible solution would be that you make a class name "active" and add the required styles then make a click event listener in your JavaScript file. Inside handler function write code to add ".active" class to the target element.
  • If you want to check my solution, this is my solution https://www.frontendmentor.io/solutions/interactive-rating-component-using-flexbox-SJTd4xFU9 . Read my code to understand it.
  • If you want to practice your flexbox skills check out this http://flexboxfroggy.com/
  • And also check this out if you want to learn JavaScript https://javascript.info/

Marked as helpful

2

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