Responsive FAQ accordion using js and flex

Solution retrospective
What is the best way to create the FAQ div in this case? Is it require to be position: absolute? Give please the best ways to create it and to create an accordion
Please log in to post a comment
Log in with GitHubCommunity feedback
- @yogskr
Hey, the design looks great!
As for your question, I used
position: relative
and set thetop
to specificpx
. Therefore, the container stays where it is as we apply the 'accordion' functionality.Marked as helpful
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