The website works fine in desktop view but the media query navigation bar on mobile is shown in the rightmost corner so it's not really hidden
CSS
links{
position:absolute;
background:#f44336;
padding:5px;
line-height: 50px;
height:100vh;
width:200px;
top:0;
right:-200px;
text-align: left;
z-index:2;
transition: 1s;
}
js
<SCRIPT>
var navLinks = document.getElementById("navLinks");
function showMenu(){
navLinks.style.right = "0px";
}
function hideMenu(){
navLinks.style.right = "-200px";
}
</SCRIPT>
Set right = "-999px" maybe can work on mobile like what you want:
<script>
var navLinks = document.getElementById("navLinks");
function showMenu(){
navLinks.style.right = "0px";
}
function hideMenu(){
navLinks.style.right = "-999px";
}
</script>