I am attempting to create a sidebar with a fixed position, featuring a small header and a scrollable content area below it.
The issue I am facing is that I am unable to scroll through the entire content within the div, resulting in some parts being cut off.
Here is my code snippet and you can also view it on jsfiddle.
HTML
<section>
<header>Some text here
<br>Few lines of content
<br>Does not matter
<br>
</header>
<div class="scroll-box">FIRST LINE
...
<br>LAST LINE
<br>
</div>
CSS
section {
position: fixed;
top:0;
left: 0;
height: 100%;
width: 300px;
background: red;
}
.scroll-box {
overflow: scroll;
height: 100%;
width: 100%;
background: #eee;
}
Thank you