How to Change the Scroll Bars in IE7
- 1). Open your CSS file for your web page or website using a text editor or your favorite CSS/HTML editor.
- 2). Enter the following code for each element of the scrollbar you want to change, specifying the hexadecimal values of your desired colors:
scrollbar-arrow-color: #000000;
scrollbar-darkshadow-color: #FFFFFF;
scrollbar-track-color: #000000;
scrollbar-face-color: #FFFFFF;
scrollbar-shadow-color: #000000;
scrollbar-highlight-color: #FFFFFF;
scrollbar-3dlight-color: #000000; - 3). Save your CSS file, then test your web pages or website in IE7.
- 4). Make adjustments to the scrollbar elements in your CSS file and retest in IE7 until you have achieved the desired result.
- 1). Open your CSS file for your web page or website.
- 2). Enter the following code in your CSS file:
body {overflow: auto;} - 3). Save your CSS file and test your web page in IE7.
- 4). Ensure that you are testing a page that is small enough that it does not need a vertical scrollbar.
- 1). Use this code change the scrollbar color when user places mouse over a specific link:
<a href="/links/?u=link.htm" onMouseOver="body.style.scrollbarBaseColor='red'">Link Text</a>
These are not CSS code snippets, but rather code that you can included in the link tag. - 2). Use this code change the scrollbar color when a user removes the mouse from a specific link:
<a href="/links/?u=link.htm" onMouseOut="body.style.scrollbarBaseColor='green'">Link Text</a> - 3). Use this code to change the scrollbar color when a user clicks the link:
<a href="/links/?u=link.htm" onClick="body.style.scrollbarBaseColor='blue'">Link Text</a> - 4). Use this code to change the scrollbar color twice, once when the user places the mouse over the link, then again when the user takes the mouse off the link:
<a href="/links/?u=link.htm" onMouseOver="body.style.scrollbarBaseColor='red'" onMouseOut="body.style.scrollbarBaseColor='green'">Link Text</a> - 5). Use this code to change the scrollbar color three times; once when the user places the mouse over the link, again when the user takes the mouse off the link, and again when the user clicks on the link:
<a href="/links/?u=link.htm" onMouseOver="body.style.scrollbarBaseColor='red'" onMouseOut="body.style.scrollbarBaseColor='green'" onClick="body.style.scrollbarBaseColor='blue'">Link Text</a>