Question
-
Topic
-
Looking for a way to use variable heights on a CSS accordion
Hey There!,
I’m Ajay owner of …………… and I’m working on a CSS accordion and I’m trying to find a way to make it animate, based on the height of the content. Currently, this only works if I specify the height. If I change the height to auto, the accordion still works, but it won’t animate because there is no height specified.Here is the code I’m using:
.ac-container input:checked ~ article.ac-small {
height: 140px;
}
.ac-container input:checked ~ article.ac-medium {
height: 180px;
}
.ac-container input:checked ~ article.ac-large {
height: 230px;
}Thank you.
Irrelevant company internet site removed as SPAM by moderator
All Answers
Viewing 0 reply threads