I'm having trouble with aligning my sidebar vertically between the header and the bottom of the browser window. Currently, the bottom items are extending beyond the browser's bottom edge. How can I adjust this to ensure proper alignment?
Here is the HTML code:
<h1>
Header
</h1>
<div class="sidebar">
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
<li>Item 6</li>
<li>Item 7</li>
</ul>
</div>
And here is the CSS code:
.sidebar{
background-color: orange;
margin-left: 30px;
height: 100vh;
position: fixed;
top: 0px;
}
.sidebar ul{
height: 100%;
list-style-type: none;
padding: 0px 15px 0px 15px;
margin:0px;
display: flex;
flex-direction: column;
justify-content: space-around;
}