I am attempting to use input:checked on an ID to display text in another section? Basically when #tab1 is checked #content1 display should change from none to block. Any help is appreciated
I've attempted
#tab1:checked ~ #content1{
display: block;
}
Here is the code:
<section class="tab--blue">
<div>
<input id="tab1" type="radio" name="tabs">
<label for="tab1">Label Text</label>
</div>
</section>
<section class="tab--grey">
<div id="content1">
<h4>Text to display </h4>
</div>
</section>