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

No JS - FAQ Accordion Challenge - flexbox desktop only not responsive

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

Solution retrospective


  • That image layout was hard!!! Like rock inside an onion. I persevered and finally got it. I ended up going through the SVG file for the geometry of the platform and then learned how to make my own SVG, so I could use them as the backdrop and the wireframe outline above. If there is an easier way, please let me know!

  • I set out specifically to do the accordion with only css because I wanted the practice (Why I'm here at Frontend Mentor). The choice reinforced how limiting the ID selector is, as well as the 'for' attribute in the <label> tag. It led to a ton of code duplication that would make me want to do the project again with JS. I realized I should have gone with radio buttons instead of checkboxes as it would only allow one question open at a time vs. having them all opened.

If I could make the accordion CSS any less duplicated without delving into javascript, please let me know. I tried all the ways I could find to avoid the copy paste increment route.

Thanks!

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 Wave'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
  • Use cases

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