I've been searching online for solutions, but so far I haven't found one that meets all the requirements.
<div class="parent">
<div class="child1">I am 60px tall and always visible; my parent is 100px tall</div>
<div class="child2">I am 80px tall and initially hidden until needed</div>
<div class="child3">I am 100px tall and also hidden until needed</div>
</div>
- I need to have multiple child Divs within a parent Div.
- Only one child should be displayed at a time.
- The height of the parent Div must match the height of the tallest child and not change.
I plan to use jQuery to handle toggling between the visible children, but I would prefer a CSS-based solution for setting the heights if possible.
No need to support IE8/9/10.
Does anyone have any suggestions?