Interactive Rating Component using Html css and Javascript
Design comparison
Solution retrospective
For my first challenge This was an interesting project and i had real fun doing it. Though i faced lots of issues building this project. Mostly in Css and Javascipt things like moving elements around to my desired postions and styling the radio inputs was some how a challenge as well as the javascript part of getting the value of the selected input for the rates. But all in all was a good first start.
Community feedback
- @DudeldupsPosted over 1 year ago
Hey Clifford 👋 And welcome to the community!
I recommend doing the smaller challenges first, there are several things in your code you should avoid. Better start small and not form bad habits (believe me, I wanted to jump ahead too) 😋
-
In your JS, you listen for the click event on the button, you should listen for the "submit" event on the form.
-
Say goodbye to all those pixels in your CSS, especially when declaring font-sizes. Use
rem
instead (or maybeem
if you know what you're doing). This way, if a user has a custom font size set in the browser, the content will adjust accordingly. -
Your card has a fixed height declared with
vh
. The larger my screen is, the loooonger it gets 😅 You should better give it amax-height
so that the content fits properly inside. -
Approach your design mobile-first. Declare all your basic CSS rules for a small screen size (320px and above) and then set rules for how the design should look when the screen gets bigger. You can use
@media
with(min-width: ...em)
or clamp() and other functions like min() to have elements responsive without media queries.
Again, I strongly suggest to just go and start with the QR-Code component and then work your way through harder challenges, it's really worth it 🤠
Happy coding! 👾
Marked as helpful0@RealHustlerPosted over 1 year ago@Dudeldups Thank you very much i appreciate your honest reply. I will take your advice in consideration
0 -
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