Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 4 years ago

FAQ Accordion Card with HTML, CSS, JavaScript

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

Solution retrospective


Hi there! Thanks for viewing my solution. I have a few questions.

1 - When do I use background image instead of a HTML img tag, (or even a pseudo element) to render an image? I tried experimenting the woman image and settled with a background image in desktop view and img tag for mobile.

2 - How do I prevent absolute position elements from moving when the accordion opens and closes?

3 - How do I centralise my entire layout with absolute positioned elements?

4 - How may I improve on my code?

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 Melvin'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