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

FAQ-accordion-card-2.0 (FLEXBOX/GRID/VJS)

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

Solution retrospective


If you click on a panel that has a content of 3 or more lines, you will find that the overall height of said content is insufficient. Thus, there is not enough spacing between the content and the bottom-border line, creating an awkward look. Currently, the height of the panel is "hardcoded." How do I make it flexible or responsive to the height of text without hardcoding the amount in pxs? I already tried a height value of auto, but by doing so the panel does not animate open/close anymore as auto is not a valid way to transition.

This was my second attempt and things look better in terms of layout. Overall, I'm proud of this one.

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