I want to know how I can change the style of the scroll bar of a browser window using CSS. I want to change it's color and width so that I can make the webpage look more attractive and comforting for users. Can I do this with CSS or should I use any other languages to do that?
I would also like to know whether styling scroll bar of a browser window affects page load speed and smoothness since I have seen websites with custom scroll bars which lags while scrolling.
I want to change the following
1. Width
2. Color of scroll bar
3. Color of scroll bar background
Here is a sample page with long enough to display a scroll bar. You may show me how to add the effect on the code below.
Sample structure code below:
HTML:
<html>
<head>
<title>
Sample Page
</title>
</head>
<body>
<div class="main">
</div>
</body>
</html>
CSS:
body{
background:#C0C0C0;
}
.main{
height:1200px;
width:1000px;
}
Also try to include the code which works with all browsers like Google Chrome, Firefox and especially IE