Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Nathaniel Lough
9,215 PointsCreate an Accordion Menu 6.25em
At 7:54
So, when you set the max height to 6.25 em, you say that you cannot transition a height from 0 to 100%.
But setting a max height of 6.25em is only going to work if you have static content and manually figure out what the right height is.
Is there no professional solution to this? Without being able to set a dynamic height that can contain any amount of tab content, I really cannot use this on the job.
If I use max-height: 100%;, then it will perfectly fit the content. However, then I lose the smooth animation. There has to be some way...
I found that if you set the max-height to something it will never be (say.... 10000px) then you get a dynamic height AND it maintains an animation. However, the animation is super incredibly fast (because it's gotta cover 10,000 px in the same time).