Question

  • Creator
    Topic
  • #2141586

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

    by stube8879 ·

    Tags: 

    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

You are posting a reply to: Looking for a way to use variable heights on a CSS accordion

The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our Community FAQs for details. All submitted content is subject to our Terms of Use.

All Answers

Viewing 0 reply threads