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

FAQ Accordion

Filippo 375

@Filippo-B

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


No particular questions, but any feedback is appreciated.

Community feedback

@liana5555

Posted

It looks okay, but functionality wise something is wrong because when I click on the 2nd and 4th question they don't fully open( on the second click they do fully open) and if I open them I can't fully close them anymore. I don't actually understand the height stuff in your code. If you don't want to show something when the page is loaded use display: none in css and when you want it to show just add another class with javascript that display: block or whatever you need in it. This way you don't have to deal with the height stuff.

1

@Omid-Heidarzadeh

Posted

@liana5555 Hi, it seems Filippo has used dynamic height property to implement a smooth opening and closing transition for answers.

2
Filippo 375

@Filippo-B

Posted

Hi @liana555, thanks for the comment.

I tried to replicate the problem you encountered, but unsuccessfully, the accordion works fine for me. What browser and operating system are you using?

The reason why I change the height instead of the visibility is the one @Omid-Heidarzadeh illustrated: animate smoothly the opening and closing of the answers.

2

@liana5555

Posted

@Filippo-B I use windows 10 Home and Google Chrome. Honestly in the code couldn't find the reason why it looked like that either. But for me it stills looks like that.

If I start opening everything and I click in order the problem only happens to the 4th one.

If I start in reverse order it only happens to the 2nd one.

If I go 1 ,5 ,2 ,4, 3 , it works noramlly and it keeps working normally even if I close everything and open evrything in a previously mentioned not working order.

When I load in and click on the 2nd it doesn't work either.

Marked as helpful

1
Filippo 375

@Filippo-B

Posted

@liana5555 Thank you for the feedback. I will look a bit more into it, hopefully I'll find the bug, but I'm pessimistic about it. :)

1

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