Struggling to implement a Nav-drawer that should open when a checkbox is selected, everything seems to be set up correctly but the issue arises when it comes to actually opening it.
Here is the code snippet:
<div class="leftside">
<input type="checkbox" id="check" name="check">
<label for="check" class="checkbtn">
<i class="fas fa-bars icon navburger"></i>
</label>
</div>
<div class="nav-items">
...
</div>
And here is the accompanying CSS code:
.nav-items{
width: 100%;
height: 100vh;
position: fixed;
overflow: hidden;
left: -100%;
display: flex;
z-index: 10001;
background-color: #fff;
flex-direction: column;
transition: all .5s;
}
#check{
display: none;
}
#check:checked ~ .nav-items {
left: 0;
}
I suspect that the issue lies somewhere in the last CSS block under #check, but I'm having trouble pinpointing exactly what's causing the problem.