I'm facing an issue with two divs where I need the parent to be fixed and the child to be scrollable.
CSS for the parent div:
aside{
height: 100%;
float: left;
width: 25%;
position: fixed;
border-style: solid;
border-right-color:rgba(0, 0, 0, 0.2);
border-top: none;
border-left: none;
border-bottom: none;
margin-top:-5px;
border-width: 1px;
z-index: 999999999;
top:0;
}
CSS for the current child div:
#big-title-list{
padding:0;
margin-left: 5px;
margin-right: 5px;
overflow: scroll;
}
The scrollbar appears but it doesn't scroll properly. I've tried several solutions from this page: Div with scrollbar inside div with position:fixed, but none of them seem to work in my case.
Here is the relevant part of the HTML code:
<aside id=asd1>
<a href="/"><img class=virus style="margin-top:25px" src="{% static 'icons\virus.png' %}" alt="virus"></a>
<div class=top-button-holder2>
<button onclick="showtime2()" class=cmonbut ><span class=spanito3>today</span><span class=spanito2>▼</span></button>
</div>
<ul id=big-title-list>
{% for title in titles2 %}
<li class=gundem>
<a href="/today/popular/{{title.url}}--{{title.title_id}}">{{title.title}}---{{title.rating}}</a>
{% if title.followed_count >= 0 %}
<div class=title-amount><span class=left-sp>{{title.followed_count}}</span> / <span
class=right-sp>{{title.amount}}</span></div>
{% else %}
<div class=title-amount>{{title.amount}}</div>
{% endif %}
</li>
{% endfor %}
</ul>
</aside>