Sorry for the inconvenience. The truth is that they would send me to Google when they read my question, but I have already searched and searched and I can not find a code to implement it on my site since doing something like this is out of my reach.
What I'm looking for is a sidenav to put it on the right side of my web, which has to be hidden / displayed by a button.
To be honest I already have one. This sidenav I got it on the w3school website, but I get an error like this:
"Can not read property 'style' of null".
The sidenav that I am looking for, is the type that does not drag the content of the page, but rather overlaps it. It is of the "overlay" type
Here is the link. link
Could someone give me a link to some, but not using Angular?
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
document.getElementById("main").style.marginRight = "250px";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
document.getElementById("main").style.marginRight= "0";
}
#wrapper-tabs-o{
width: 220px;
}
#wrapper-tabs-o li{
color: #B0B0B0 ;
}
.sidenav {
height: 100%;
width: 0;
position: fixed;
z-index: 1;
right: 0;
background-color: #292F33;
overflow-x: hidden;
transition: 0.5s;
}
.sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: inline;
transition: 0.3s
}
.sidenav a:hover, .offcanvas a:focus{
color: #f1f1f1;
}
.sidenav .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-right: 50px;
}
#main {
transition: margin-right .5s;
padding: 16px;
}
/*@media screen and (max-height: 450px) {
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
}*/
<div id="mySidenav" class="sidenav">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">x</a>
<div id="wrapper-tabs-o">
<ul class="tabs2">
<li class="tab-link current" data-tab="tab-1"><i class="fa fa-list"
aria-hidden="true"></i></li>
<li class="tab-link" data-tab="tab-2"><i class="fi-comment"></i></li>
<div class="div_search"></div>
</ul>
</div>
</div>
By the way this code I have it in a separate file called sidenav.php, which is embedded in the main page by an include ("")