Reputation: 14925
I have a modal that contains two columns
. I am trying to make the columns scrollable independent of each other. The important thing is that I want the tick scrollbar be hidden.
I have only made the row scrollable and the scrollbar is hidden. But I can't make the two columns be so.
https://codepen.io/anon/pen/bKxodX
There are a few similar questions have been asked before, but they did not help.
How can i make 3 independently scrollable columns
How to create two independently-scrollable columns in a responsive grid?
Hide scroll bar, but while still being able to scroll
This is a widget in an App that we use. So, I am can not change style of body, html, and the parent of container-fluid.
Upvotes: 1
Views: 6835
Reputation: 2319
I believe below approach solves your issue. Scrollbars are hidden using trick with overflow: hidden
and hiding scrollbar with padding
.
.col {
overflow: hidden;
}
.col-inner {
width: 100%;
height: 100%;
overflow-y: scroll;
padding-right: 30px;
box-sizing: content-box;
}
Upvotes: 3