Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Design with Flexbox, Transitions, Animations and Image Positioning

Fabian 30

@FabianAlv

Desktop design screenshot for the FAQ accordion card coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


My question is regarding user experience, I added an accordion animation to show and hide the answer to the questions, I think the accordion work well in this case because the answers (sentence) have almost the same amount of lines, 2 or 3. But if there were some 2, 3 liners and other with something like 10 or more lines would the accordion behavior still be a good choice or would we need to think of a different solution in this case?

Community feedback

blahblah 240

@blahking

Posted

Your solution set the "card__faq__answer" same height, you can use JS to control "card__faq__answer" height dynamically. When "card__faq" is active state, set the "card__faq__answer" element's height be "card__faq__answer".scrollHeight, else "card__faq__answer" element's height will set be "0px". Hope it helps you

0

Please log in to post a comment

Log in with GitHub
Discord logo

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