Is there anyway to style, modify, or remove the scrollbars of a scrollable html div?
The scrollbar width First, we need to define the size of the scrollbar. This can be the width for vertical scrollbars, and the height for horizontal ones. With that set, we can style the scrollbar itself.
Scrollbar Selectors For webkit browsers, you can use the following pseudo elements to customize the browser's scrollbar: ::-webkit-scrollbar the scrollbar. ::-webkit-scrollbar-button the buttons on the scrollbar (arrows pointing upwards and downwards). ::-webkit-scrollbar-thumb the draggable scrolling handle.
I believe your only option is to remove the scrollbars altogether with CSS.
#your_div {
overflow: hidden;
}
The scrollbars themselves are a "browser thing", and as such can't be styled.
EDIT: If you are willing to use "fake" scrollbars--i.e., they aren't actual browser scrollbars they're an HTML element created with Javascript/jQuery that work "like" scrollbars--then you can use Jscrollpane.
The scrolling looks surprisingly smooth and nice, but I would worry some about how it might work in more novel environments--i.e., a touchscreen interface.
Demos of JScrollpane.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With