Design comparison
Solution retrospective
Hello Developers!!!
I am Kaushal 🚀🚀🚀, And this is my solution, feel free to suggest any improvement in the code.
Skill used:
- Semantic HTML5 markup
- SCSS
- Javascript
- CSS custom properties
- Flexbox
- Mobile-first workflow
Community feedback
- @sotnabPosted over 1 year ago
Hi,
Your project looks cool, but there is a lot things to improve. Sizes of fonts and elements are much different than in design. Some elements arent centered, and well-positioned.
I really like your slider which runs smooth.
<p class=" tggl" id="tggl_1" onclick="toggle(this)">1</p> <p class=" tggl" id="tggl_2" onclick="toggle(this)">2</p> <p class=" tggl" id="tggl_3" onclick="toggle(this)">3</p>
Never cast function to js events in html. Script should be separated from html document. In this case you can get these elements by
document.querySelectorAll('.tggl')
and add listeners to every item in loop.There are some other issues like duplicated id's or typos in names but i hope you are going to fix it asap.
Keep it up
Marked as helpful0
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