xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div class="content">
<!-- Your main content goes here -->
</div>
</body>
</html>
xxxxxxxxxx
<style>
#app {
width:100vw;
height:100vh; // u can set it as auto if you want
display:flex;
}
#sidebar {
width:30%; // u can adjust it
height:100%;
}
#main-content {
width:100%;
height:100%;
}
</style>
<div id="app">
<div id="sidebar">
</div>
<div id="main-content">
</div>
</div>
xxxxxxxxxx
<a class="btn btn-primary" data-bs-toggle="offcanvas" href="#offcanvasExample" role="button" aria-controls="offcanvasExample">
Link with href
</a>
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample" aria-controls="offcanvasExample">
Button with data-bs-target
</button>
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasExampleLabel">Offcanvas</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div>
Some text as placeholder. In real life you can have the elements you have chosen. Like, text, images, lists, etc.
</div>
<div class="dropdown mt-3">
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown">
Dropdown button
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</div>
</div>
</div>
xxxxxxxxxx
<div id="side-nav" style="width:100px(you can change this however you like);
height:100vh(if this doesn't work try 100%, anything that will get this to full height);
float:right/left; position:sticky;">
<ul>
<li></li>
</ul>
</div>
xxxxxxxxxx
.sidebar {
width: 200px;
height: 100%;
background-color: #333;
color: #fff;
position: fixed;
}
.sidebar ul {
list-style-type: none;
padding: 0;
margin: 0;
}
.sidebar li {
padding: 10px;
}
.sidebar li a {
color: #fff;
text-decoration: none;
}
.sidebar li a:hover {
background-color: #555;
}
.content {
margin-left: 200px; /* Same as the width of the sidebar */
padding: 20px;
}