I was trying to make side navigation bar open with a checkbox but when I check the box the side bar doesn't appear

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>

193 thoughts on “I was trying to make side navigation bar open with a checkbox but when I check the box the side bar doesn't appear”

  1. [url=https://tadalafilxm.online/]tadalafil 5 mg tablet price[/url] [url=https://midviagra.online/]cheap generic viagra 150 mg[/url] [url=https://piroxicam24.online/]best price for piroxicam[/url] [url=https://buyantidepressants24.online/]prozac online no prescription[/url]

    Reply
  2. Pingback: stromectol kidney
  3. Pingback: ivermectin 625

Leave a Comment