When the radio button #my102 is selected, the div #navi102 should be visible and all other #navi??? divs should be hidden. Similarly, if the radio button #my7 is selected, the div #navi7 should be visible and others hidden.
What would be the best approach to achieve this?
CSS snippet:
.list {
}
.opt ~ .list {
display: none;
}
.opt:checked ~ .list {
display: block;
}
input[type="radio"]#my1:checked + div #navi1 { display: block; }
input[type="radio"]#my2:checked + div #navi2 { display: block; }
input[type="radio"]#my3:checked + div #navi3 { display: block; }
input[type="radio"]#my4:checked + div #navi4 { display: block; }
input[type="radio"]#my5:checked + div #navi5 { display: block; }
input[type="radio"]#my6:checked + div #navi6 { display: block; }
input[type="radio"]#my7:checked + div #navi7 { display: block; }
input[type="radio"]#my99:checked + div #navi99 { display: block; }
input[type="radio"]#my100:checked + div #navi100 { display: block; }
input[type="radio"]#my101:checked + div #navi101 { display: block; }
input[type="radio"]#my102:checked + div #navi102 { display: block; }
HTML code excerpt:
<div id="chart" style="white-space: nowrap; position: relative; text-align: center;">
<div style="display: inline-block">
<!--
--><input name="case" type="radio" id="my102" class="opt" /><div class="list" style="float:left;width:70px">
<div id="navi102">
<div style="z-index:100;position:fixed;right:0;top:50px">101</div>
</div>
</div><div style="display: inline-block;vertical-align:top;width:70px">extra
</div><!-- ... continue with HTML code displayed in a similar manner ... </div>
</div>