Hello all CSS wizards! I would like to swap three different visible areas using a select element. <select class="sheet-block-switch" name="attr_drowpdown_option"> <option value="1" selected="selected">Option A</option> <option value="2">Option B</option> <option value="3">Option C</option> </select>
<div class="sheet-block-a">A</div>
<div class="sheet-block-b">B</div>
<div class="sheet-block-c">C</div>
The wiki has the CSS spelled out plainly for using a checkbox, as shown below, but does something similar work for a select element? .sheet-block-a,
.sheet-block-switch:checked ~ .sheet-block-b {
display: block;
}
.sheet-block-b,
.sheet-block-switch:checked ~ .sheet-block-a {
display: none;
} Any guidance would be appreciated. Is a script needed here?