FAQ accordion card (Vanilla CSS)

Solution retrospective
Features:
- Achieved perfect scores on PageSpeed Insights.🎉
- The code was formatted with Prettier.
- Close resemblance with the original design.
Built With:
- npm - prettier.
I used CSS for the functionality of the FAQ accordion opening and JavaScript for only changing the aria-expanded from false to true and vice versa.
What challenges did you encounter, and how did you overcome them?Image positioning for mobile really tested me, but I was able to achieve it when I added margin to the top of the section housing the FAQ questions and absolutely positioned the image.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Abere Fejiro'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