FAQ accordion card using HTML, CSS and JavaScript

Solution retrospective
I found the accordion fairly easy to implement and also making a single accordion expand at a time. However i found it difficult (couldn't figure it out at all) to add/remove the active class on the accordion button so that the font weight/arrow direction would be correct when the panel would shrink once another button/question was clicked. The class is added and removed when a button is selected then that same button is selected again but doesn't work if another button is selected.
I also couldn't figure out how to have the left portion of the main image(woman online) to be behind the background.
I also struggled a little getting this to be mobile responsive.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Mario Lisbona'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