No Javascript at all - FAQ Accordion Card - HTML & CSS
Design comparison
Solution retrospective
Have you ever tried the Checkbox Hack? I did and I found it very ingenious. Do you know an alternative way to obtain the same result with CSS only? Let me know, if you'd like to. However, next time I'll try to replicate the challenge also with Javascript, it'll be fun!
Community feedback
- @MieszkoKowalikPosted over 3 years ago
You can also check out "details" element for CSS only accordion.
There are some issues on mobile landscape resolutions so you probably would need to set min-height for the container.
0@StefanoDeCapitaniPosted over 3 years ago@MieszkoKowalik Wow, didn't know about "details". I've just checked and found a good css-trick article about it. The functionality is exactly like what is needed, although it's a pity that you can't style very much the default triangle...so, even if overall it is more elegant, in this case that solution would have been slightly different in term of design.
Thanks for your time and suggestions, I learned something new!
Happy coding :)
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