MercuryRising
New Coder
This code:
[CODE lang="css" title="Old CSS" highlight="1"].cl1 clChk:checked ~ cl2 {
opacity: 1;
height: auto;
}[/CODE]
worked perfectly fine with this structure:
[CODE lang="html" title="old html" highlight="2,3"]<div class="cl1">
<label class="clLabel" for="chk_1"></label>
<input class="clChk" type="checkbox" id="chk_1">
<article class="cl2">
..some text..
</article>
</div>[/CODE]
But i do not know how to change the css for this html structure to get the same result:
[CODE lang="html" title="New Html" highlight="2"]<div class="cl1">
<label class="clLabel"><input class="clChk" type="checkbox"></label>
<article class="cl2">
..some text..
</article>
</div[/CODE]
I have tried many variations, but i cannot seem to get it to work; so if the checkbox isn't nested in the label, there is no issue, but i need the checkbox nested in the <label>.
Thank you so much for your help!
[CODE lang="css" title="Old CSS" highlight="1"].cl1 clChk:checked ~ cl2 {
opacity: 1;
height: auto;
}[/CODE]
worked perfectly fine with this structure:
[CODE lang="html" title="old html" highlight="2,3"]<div class="cl1">
<label class="clLabel" for="chk_1"></label>
<input class="clChk" type="checkbox" id="chk_1">
<article class="cl2">
..some text..
</article>
</div>[/CODE]
But i do not know how to change the css for this html structure to get the same result:
[CODE lang="html" title="New Html" highlight="2"]<div class="cl1">
<label class="clLabel"><input class="clChk" type="checkbox"></label>
<article class="cl2">
..some text..
</article>
</div[/CODE]
I have tried many variations, but i cannot seem to get it to work; so if the checkbox isn't nested in the label, there is no issue, but i need the checkbox nested in the <label>.
Thank you so much for your help!