Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 3 years ago

FAQ accordion | rought draft

funupulu•120
@funupulu
A solution to the FAQ accordion card challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


First time building an accordion, as it were. In the app.js file, you'll notice I wrote many variables to individually target each question and answer element. I wrote the same logic twice because I don't know how to loop through each target without getting errors. Thanks always for any feedback. Current following this code-along to troubleshoot and debug.

https://www.youtube.com/watch?v=FboXxLxg8eo&t=337s

Other notes:

I don't know how to center the <hr> tag. I don't understand what it is that enables margin and padding to apply or why it doesn't.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on funupulu'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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License