I wanna make this absolutely positioned bar fill 100% of this overflow-y container's scroll height & change dynamically (if possible).
<div id="container">
<div id="item"></div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>
#container {
height: 300px;
overflow-y: scroll;
background-color: #333;
position: relative;
}
#item {
position: absolute;
left: 50px;
width: 2px;
background-color: lightgreen;
height: 100%;
}
https://codepen.io/springer268/pen/oNZJrjN
// sidenote Hacky solutions that don't work in my use case include making it position fixed, or making it absolute to another div above. It has to be relative to this container (zooming issues + other thing.) and actually change height. I'd really like to avoid JS here (using React & it'd get all funky).
Thanks