I've been working on a sidebar design and everything seems to be going well so far. However, I've encountered an issue that has been giving me trouble for days now. Whenever I display a new page and then resize the screen, the content of the page ends up sliding behind the sidebar. Is there any way to prevent this from happening? I want the sidebar to remain fixed in size regardless of the screen size. Below is the code from my _layout page, hopefully someone can help me identify what I'm doing wrong.
<style>
#sidebar {
position: fixed;
width: 250px;
z-index: 1000;
left: 0;
top: 68px;
bottom: 60px;
display: block;
background-color: rgb(95,131,183);
}
.nav-item {
border-bottom-color: #9EB4D3 !important;
word-spacing: 10px;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
}
.nav-link:hover {
background-color: #373443;
}
</style>
<body>
<!-- Your HTML code here -->
@await RenderSectionAsync("Scripts", required: false)
</body>
Thank you, AJ