Question Locked

Looking for a way to use variable heights on a CSS accordion

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

1 reply

This discussion is closed to new replies.