Having an expandable menu how to use the CSS transition to open / close at the same time the part that is open and the part you are closing?
The problem does not arise if the menus are the same size (example) , but when the size is different it gives idea that CSS reads max-height
as the real value and not as a maximum ...
Example of the problem here: Fiddle
HTML
<div class="max">
<ul class="menu">Pequena
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
<ul class="menu">Pequena
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
<ul class="menu">Grande
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
<li>Six</li>
<li>Seven</li>
<li>Eight</li>
<li>Nine</li>
<li>Ten!</li>
</ul>
</div>
CSS
.max ul {
border:2px solid #a5f;
overflow:hidden;
max-height:20px;
transition: all 1s ease-in-out;
}
.max ul.opened {
max-height: 250px;
}