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
<!DOCTYPE html>
<html>
<head>
<style>
/* CSS styles for the sidebar */
.sidebar {
background-color: #f1f1f1;
width: 200px;
height: 100vh;
position: fixed;
}
</style>
</head>
<body>
<div class="sidebar">
<!-- Sidebar content goes here -->
<h2>Sidebar</h2>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</div>
<!-- Rest of the page content -->
<main>
<h1>Main Content</h1>
<p>This is the main content of the page.</p>
</main>
</body>
</html>
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
.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;
}