When it comes to the scrollbar on a div
that is set to overflow: scroll
or auto
, it is important to note that this is actually the browser's native scrollbar using standard OS widgets. It is not something that can be easily styled.
Although it is possible to create a custom scrollbar using stylable divs and JavaScript, it is not recommended in most cases. Custom scrollbars often do not provide the same user experience as the browser's default scrollbar, leading to potential usability and accessibility issues.
It is worth mentioning that even styling the scrollbar colors in Internet Explorer is not ideal. Not only is it limited to IE, but it also reverts the browser to outdated Windows 95-style scrollbars instead of using the current theme's scrollbar images.