Accordion FAQ fully done by css using element (thanks Grace)

Solution retrospective
Is there a way to make it more beautiful?
I've done the accordion using only css and <details> element. My main issue is that when I click on a new question the previous answers don't collapse (which is quite annoying for me). I've tried using only css without any js for the bonus points. On StackOverflow people answered that they believe that it could be done only by js.
Essential, for the above-mentioned reason I needed to make a height bigger than usual, which doesn't look nicely when all the answers are collapsed.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Aleksa Mitrović's solution.
Join 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