Design comparison
Solution retrospective
Is this optimal way to do?? toggling class, or if there is other please feel free to recommend.
Community feedback
- @danielmrz-devPosted 11 months ago
Hello @ddkogit!
Your solution looks awesome!
You can add the
background-color: #FAEEFF;
and abackground-image
together to create that pattern. They will complement each other. It's not like "It's one OR the other", you can use both 😊I hope it helps!
Other than that, great job!
Marked as helpful0 - @piushbhandariPosted 11 months ago
-
toggling class to show/hide content via javascript is a good approach and you'll see this as being best practice.
-
BTW, when i zoom out on your page, your layout gets messed up. i would change your styles on your body element to
background-repeat: repeat-x; background-size: contain;
. FYI, i would have the background image as a separate element -
i would change
<div class="question">
to<button type="button" class="question">
. it's good to use semantic markup + as it stands right now your component is not accessible via keyboard and that's a no no. likely will need to update styles
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