I need a solution where multiple rows and columns can be scrolled horizontally using just one scroll bar. I have already tried implementing the scrollbar for only one row with multiple columns, but it didn't work as expected. Here is the code that I attempted:
.page {
width: auto;
margin: auto;
}
.hs {
list-style: none;
overflow-x: auto;
white-space: nowrap;
width: 100%;
padding: 0 10% 2rem 0%;
}
.hs .item {
display: inline-block;
width: auto;
text-align: center;
margin-right: 0.75rem;
height: 100%;
white-space: normal;
}
::-webkit-scrollbar {
height: 15px;
}
::-webkit-scrollbar-track-piece {
background-color: gray;
}
.li {
text-decoration: none;
}
<div class="container page">
<ul class="hs">
<li class="item">
<div class="col-lg-3 col-md-4 col-sm-6 ">
<div class="card border-0" style="width: 15rem;">
<img class="card-img-top" src="images/image 25.png" alt="Card image cap">
</div>
</div>
</li>
<li class="item">
<div class="col-lg-3 col-md-4 col-sm-6 ">
<div class="card border-0" style="width: 15rem;">
<img class="card-img-top" src="images/image 25.png" alt="Card image cap">
</div>
</div>
</li>
<li class="item">
<div class="col-lg-3 col-md-4 col-sm-6 ">
<div class="card border-0" style="width: 15rem;">
<img class="card-img-top" src="images/image 25.png" alt="Card image cap">
</div>
</div>
</li>
<!-- Additional items shortened for brevity -->
</ul>
</div>