html - Targeting an element with CSS -
html - Targeting an element with CSS -
i've had around , have found many different ways target element, none im looking do.
basically, want toggle display of <section>
using checkbox input.
my html code is...
<li><input type="checkbox" class="toggle" id="contacttog"><label for="contacttog">contact</label></li> </ul> </nav> </header> </div> <div style="clear:both"></div> <section class="hiddencontact" id="hiddencontact"></section>
so want utilize input toggle .hiddencontact
any help appreciated. know can utilize js this. i've tried..
input.toggle { display: none; } input.toggle + .hiddencontact { height: 200px; margin: .2rem; overflow: hidden; } input.toggle:checked .hiddencontact { display: block; min-height: 200px; }
to no avail,
html css
Comments
Post a Comment