Reputation: 32107
I am creating a <div>
with a class someClass
.someClass {
overflow:scroll
/*other props*/
}
The problem is that the scrollbars are always visible even when the data is not overflowing. I want the scrollbars to be visible only when data actually overflows.
Upvotes: 2
Views: 1663
Reputation: 33749
overflow:auto;
should do it. You need to set a width (for horizontal scrolling) and height (vertical) for that to pop out scrollbars at the right time though.
Upvotes: 9