I want to customize a scrollbar with CSS.
I use this WebKit CSS code, which works well for Safari and Chrome:
::-webkit-scrollbar {
width: 15px;
May I offer an alternative?
No scripting whatsoever, only standardized css styles and a little bit of creativity. Short answer - masking parts of the existing browser scrollbar, which means you retain all of it's functionality.
.scroll_content {
position: relative;
width: 400px;
height: 414px;
top: -17px;
padding: 20px 10px 20px 10px;
overflow-y: auto;
}
For demo and a little bit more in-depth explanation, check here...
jsfiddle.net/aj7bxtjz/1/