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-challenge

Tushar 20

@Tushar6396

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


This was my second challenge. Looking for more. Feel free to check and please provide your valuable feedbacks.

Community feedback

Adriano 34,090

@AdrianoEscarabote

Posted

Hi Tushar, how are you?

I really liked the result of your project, but I have some tips that I think you will enjoy:

To make the submit button work only when a user selects a number, do this:

btn.forEach((btn) => {
    btn.addEventListener("click",() => {
        rating.innerHTML = btn.innerHTML
        button.addEventListener("click",() => {
            thanks.style.display = "block"
            main.style.display = "none"
        })
    })
})

The rest is great!

I hope it helps... 👍

Marked as helpful

0

Tushar 20

@Tushar6396

Posted

Hii @AdrianoEscarabote thanks a lot for spending your valuable time while reviewing my code. I really appreciate your efforts and will surely look forward with your suggestions. Thanks once again for your feedback.

0
Adriano 34,090

@AdrianoEscarabote

Posted

@Tushar6396 happy coding!!

Marked as helpful

0
P

@AlexandruStefanGherhes

Posted

Hello @Tushar6396, congrats on finishing the challenge and you did a good job on it. To have your card center exactly in the middle of the screen try adding "height:100vh" to the body and remove the margin-top from the main container.

For the main container, you could add more padding-top to have a bit more space between the start and the border of the container. You could also increase the size of the buttons to 45 px, like that they would be a little closer together and look much better. For the button, try increasing the padding to 12px and the border radius to 25px with a font size of 16px, and see how it looks.

Good luck on your future challenges.

Marked as helpful

0

Tushar 20

@Tushar6396

Posted

Hi @AlexandruStefanGherhes , hope you are doing well. Thanks a lot for spending your precious time while reviewing my code. I will surely pay attention to your suggestions and try to implement these in the future. Thanks a lot again and good luck to you too.

0

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