I'm struggling to keep the navbar in place without it disappearing. Here is my current code:
var sideBar = document.getElementById('sidebar')
var menuIcon = document.getElementById('menu-icon')
function show() {
menuIcon.style.display = "none"
sideBar.style.display = "Block"
}
function hide() {
menuIcon.style.display = "inline"
sideBar.style.display = "none"
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial, Helvetica, sans-serif;
}
...
<!DOCTYPE html>
<html lang="en">
...
</nav>
<