Any ideas where I went wrong? I have tried setting width to 0 inside CSS and using JavaScript to add width it still didn't work.
function showsidenav(){
document.getElementsById("barres").style.display = "block";
}
.opened-side-nav {
background-color: ghostwhite;
width: 30%;
height: 100%;
position: absolute;
border-right: black 2px solid;
z-index: 1;
overflow: hidden;
display: none;
}
<!--Nav Bar-->
<div class="opened-side-nav" id="barres">Content</div>
<div class="logo">
<input id="5055" class="showsidenavbar" type="checkbox" onclick="showsidenav()">
<label for="5055">=</label>
</div>
</div>