<span class='radio'>Place holder for Radio1</span>
<input checked type=radio name='radio' class='radio'>
<span class='radio'>Place holder for Radio2</span>
<input type=radio name='radio' class='radio'>
In this, I only want the <span>
associated with the respective radio button to be visible but...
* {
visibility:hidden
}
.radio + .radio:checked {
visibility:visible;
}
doesn't work, while this does:
* {
visibility:hidden
}
.radio:checked + .radio {
visibility:visible;
}
So why can't I select and manipulate the css related to the previous adjacent sibling?