In my case, I want to implement two side navbar as right and left.
Above image is explained the output that I want to get
Written HTML and CSS files are mentioned below.
:root {
font-size: 16px;
font-family: 'Open Sans';
--bg-color: #23232e;
}
body {
color: black;
background-color: white;
margin: 0;
padding: 0;
}
main {
margin-left: 16rem;
margin-right: 16rem;
padding: 1rem;
}
.navbar-left {
position: fixed;
background-color: var(--bg-color);
overflow: scroll;
height: 100vh;
width: 16rem;
}
.navbar-right {
position: fixed;
background-color: var(--bg-color);
overflow: scroll;
height: 100vh;
width: 16rem;
}
<nav class="navbar-left">
<h1>
Left Left Left Left Left Left Left Left Left Left Left Left Left Left
</h1>
</nav>
<main>
<h1>
Center Center Center Center Center Center Center Center Center
</h1>
</main>
<nav class="navbar-right">
<h1>
Right Right Right Right Right Right Right Right Right Right Right
</h1>
</nav>
After running above output, overlap right nav on to the left.