I'm trying to use strictly CSS(3) to animate the height of a div
larger and smaller, based on which class it has. The problem is that the larger height could/should change depending on how much content is in the div
.
Here is my current code:
.failure-info{ width:97%;
padding:.2em .5em 0 .5em;
overflow:hidden;
cursor:pointer;
-moz-transition-property: height; -moz-transition-duration: .7s;
-webkit-transition-property: height; -webkit-transition-duration: .7s;
transition-property: height; transition-duration: .7s;
}
.failure-info.height-small{ height:16px; }
.failure-info.height-large{ height:85px; }
This works well, except when more content gets added to .failure-info
and the inner-html goes over the 85px
height for the large class. Content is added, and class is changed via jquery, so I'm not adverse to doing this with a jquery function if it can't be accomplished with pure CSS; however, I'd like to keep it CSS if possible!
Any ideas? Thanks in advance.