My code have a checkbox and label in the header to check when is going to need to be responsive but the selector of being checked isn't working
Here's the thing: Visualization
Anyone knows about what's going on?
<div className="header-container">
<nav>
<input type="checkbox" id="check" />
<label htmlFor="check" className="checkbtn">
<i>
{" "}
<HiOutlineViewList />{" "}
</i>
</label>
</div>
And the CSS code
@media (max-width: 730px) {
.checkbtn {
display: block;
}
ul {
margin-left: 0%;
position: fixed;
top: 30px;
width: 100%;
height: 100vh;
background: $bg-header;
text-align: center;
transition: all 0.5s;
}
ul li {
display: block;
margin: 20px 0;
line-height: 40px;
}
ul li a {
font-size: 12px;
font-weight: 700;
}
ul li a:hover {
color: $base-color-dark;
}
.right-container {
display: none;
}
#check:checked ~ ul {
margin-right: 0;
}