I have been stuck with this simple problem for a while now. It might be a duplication but I couldn't find a similar problem online.
I am trying to make the green bar height 100% (to have the same height as the red parent).
Here is a codepen if it helps: https://codepen.io/tartie2/pen/NWYZpgj
Here is the code:
div {
background-color:red;
height:200px;
width:300px;
position: relative;
overflow: auto;
}
div::after{
content: '';
position:absolute;
top: 0;
left: 0;
min-height: 100%;
width:10px;
background-color: green;
}
<div>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
</div>