There are two list under each other in container. If we start scrolling without mouse moving, scroll will stop when the first list end achieved. Then if move mouse and scroll again it switch to container and then to the second list.
Is there way in order to do common scrollbar for both lists? Or exclude interruption when list end achieved.
.container {
width: 150px;
height: 70px;
overflow: auto;
}
.list {
height: 50px;
overflow: auto;
}
<div class="container">
<ul class="list">
<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>
<li>Item 8</li>
<li>Item 9</li>
<li>Item 10</li>
<li>Item 11</li>
<li>Item 12</li>
</ul>
<ul class="list">
<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>
<li>Item 8</li>
<li>Item 9</li>
<li>Item 10</li>
<li>Item 11</li>
<li>Item 12</li>
</ul>
</div>
2
Answers
You can replace the overflow:auto by a single one in ‘scroll’ using the flex method like this :