Design comparison
Solution retrospective
This solution is only the first try, so it expands only the first answer and doesn't have a background-pattern. With the help of solutions on the site I'll figure out how to improve my solution and I'll upload it
Community feedback
- @Serdarq1Posted 10 months ago
Hi, I checked your script and the error happens because of usage of the querySelector. querySelector selects only the first child of multiple tags. There are multiple things you can do to improve your solution. Firstly, you can use querySelectorAll and then use forEach to loop every single item however if you are new to javascript I would not recommend it. Secondly, instead of using onClick on html page you can create event listener(questionContainer.addEventListener("click", () => {})) and you can loop every single item with forEach or you can name every container's class something different and add event listener to all. If you get stuck at somewhere you can ask again. Hope you find this helpful
Marked as helpful0 - @danielmrz-devPosted 10 months ago
Hello @tAndreii!
Your project looks really good!
You're missing the background, though.
- Reminder: You can use both
background-color
andbackground-image
together on the body. They will not cancel each other.
I hope it helps!
Other than that, great job!
1@tAndreiiPosted 10 months agoHey, @danielmrz-dev!
Thank you for reply and tip about the background.
I appreciate it!
1 - Reminder: You can use both
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