@LonelyBuddy
Posted
I just tried it in the Chrome dev tool, and it works by giving .wrapper .container .question.active p
a fixed height value. I think the transition just doesn't work on auto value🤔.
Marked as helpful
Looking to hire developers?
Hey Everyone! This is my solution to the FAQ section.
I need some help with a transition I have been trying to make but haven't succeeded yet.
When the answer 'hides' I want to transition the height, so that it closes smoothly, I tried to put a transition to .question__answer
but I didn't see any effect. Does anyone have any suggestions?
Your answer is very much appreciated! Thank you in advance! :)
@LonelyBuddy
Posted
I just tried it in the Chrome dev tool, and it works by giving .wrapper .container .question.active p
a fixed height value. I think the transition just doesn't work on auto value🤔.
Marked as helpful
@A-amon
Posted
Hmm... such a weird issue! 👀 This might not be the best solution but, after referring to this, turns out that setting the height to a value with any unit other than % will solve it. For example, try height:3rem;
instead of auto
. 😲
@Kristiana12
Posted
@A-amon thanks for your tip! I tried it on Vscode, but I didn't see any difference
@A-amon
Posted
@Kristiana12 😲Which height's value did you change? I forgot to add it was supposed to be .wrapper .container .question.active p
.
Marked as helpful
@Kristiana12
Posted
@A-amon Thank you!
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