Using radio buttons to trigger hidden/shown accordion menu. Works in jsfiddle... Does not work in any other browser I've tried. I'm assuming its something small I've miss typed or am missing or I'm totally lost. I'm aware not everything works right in all browsers/setups/etc but from what I've read/understood this work?
EDIT: max-height does not work in jsfiddle either... So this must be the problem. Basically I want the ul to auto expand to the length of it's li list. So using a fixed height will not work. height: auto; as well as max-height; neither work..
Any and all help is appreciated it.
HTML
<section class="container">
<div>
<input id="test1" name="acctest" type="radio" checked />
<label for="test1">About us</label>
<ul>
<li>test</li>
<li>test2</li>
</ul>
</div>
<div>
<input id="test2" name="acctest" type="radio" />
<label for="test2">About us</label>
<ul>
<li>test</li>
<li>test2</li>
</ul>
</div>
CSS
.container ul{
background: rgba(255, 255, 255, 0.5);
margin: 0px;
overflow: hidden;
height: 0px;
position: relative;
margin: 0;
z-index: 1;
-webkit-transition: height 0.5s ease-in-out, box-shadow 0.9s linear;
-moz-transition: height 0.5s ease-in-out, box-shadow 0.9s linear;
-o-transition: height 0.5s ease-in-out, box-shadow 0.9s linear;
-ms-transition: height 0.5s ease-in-out, box-shadow 0.9s linear;
transition: height 0.5s ease-in-out, box-shadow 0.9s linear;}
.container li{
height: 25px;
color: #000;
font-size: 12px;}
.container input:checked ~ ul{
-webkit-transition: height 0.5s ease-in-out, box-shadow 0.9s linear;
-moz-transition: height 0.5s ease-in-out, box-shadow 0.9s linear;
-o-transition: height 0.5s ease-in-out, box-shadow 0.9s linear;
-ms-transition: height 0.5s ease-in-out, box-shadow 0.9s linear;
transition: height 0.5s ease-in-out, box-shadow 0.9s linear;
max-height: 50px;}
UPDATED jsfiddle link: http://jsfiddle.net/ETaXr/2/
Thanks again!