
Hi there, I am trying to do something quite simple: I want 3 radio buttons which correpond to three tabs underneath it. Click on a button and the corresponding tab appears The following code work: <td style="vertical-align:top"> <input type="radio" name="attr_tab" class="sheet-tab sheet-tab1" value="1" checked="checked" /><span title="Abilities">Abilities</span> <input type="radio" name="attr_tab" class="sheet-tab sheet-tab2" value="2" /><span title="Second Tab">Inventory</span> <input type="radio" name="attr_tab" class="sheet-tab sheet-tab3" value="3" /><span title="Third Tab">Spells</span> <div class="sheet-tab-content sheet-tab1"> Lorem ipsum dolor sit amet </div> <div class="sheet-tab-content sheet-tab2"> consectetur adipisicing elit </div> <div class="sheet-tab-content sheet-tab3"> sed do eiusmod tempor incididunt ut </div> </td> with the following CSS txt: .sheet-tab-content { display: none; } input.sheet-tab1:checked ~ div.sheet-tab1, input.sheet-tab2:checked ~ div.sheet-tab2, input.sheet-tab3:checked ~ div.sheet-tab3, { display: block; } So far so good but when I want to neatly put the buttons and the tabs in a table, it stops working: <td style="vertical-align:top"> <table style="width:100%,"> <tr> <td> <input type="radio" name="attr_tab" class="sheet-tab sheet-tab1" value="1" checked="checked" /><span title="Abilities">Abilities</span> </td> <td> <input type="radio" name="attr_tab" class="sheet-tab sheet-tab2" value="2" /><span title="Second Tab">Inventory</span> </td> <td> <input type="radio" name="attr_tab" class="sheet-tab sheet-tab3" value="3" /><span title="Third Tab">Spells</span> </td> </tr> <tr> <td colspan=3> <div class="sheet-tab-content sheet-tab1"> Lorem ipsum dolor sit amet </div> <div class="sheet-tab-content sheet-tab2"> consectetur adipisicing elit </div> <div class="sheet-tab-content sheet-tab3"> sed do eiusmod tempor incididunt ut </div> </td> </tr> </table> </td> What am I doing wrong and what do I need to modify ?