HTMLHTML TutorialHTML Codes/Generators
HTML Background Code
HTML TagsHTML Color HTML Color Chart HTML Comment Box Code HTML Scrollbox Code HTML Text Code HTML Image Code HTML Marquee Code HTML Music Code HTML Video Code HTML Form Code HTML Frames Code HTML Entities HTML Examples HTML Help/Cheat Sheet HTML Templates More Codes... HTML Generator HTML Table Generator Marquee Generator Music Code Generator HTML Text Generator Text Box Generator MySpace Generators More Generators... HTML 5 Tags Create a Website
Sponsored Links
$1.99 Domain Names
With every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99. |
HTML ScrollbarsYou can change the scrollbar color using the following HTML/CSS code. Note that, changing the scrollbar color is not part of the official CSS specification so this code will not work in all browsers. For example, the code works in Microsoft Internet Explorer 5.5 and above but not Firefox. Therefore, the examples on this page probably won't work unless you're using Internet Explorer. In any case, you can still copy/paste the code into your own website. Scrollbar Color of the BrowserThe easiest way to change the color of your scrollbars is to apply the 'scrollbar-base-color' property to the HTML 'body' element. Note that this code actually changes the color of all scrollbars on the page (including those of form elements such as the 'textarea' element).
This code results in: Scrollbar Color for 'Textarea' OnlyYou can add color to the scrollbars of your form elements without it affecting the browser scrollbars. All you need to do is replace 'body' with the name of the form element. For example, change 'body' to 'textarea'. Like this:
This code results in: Scrollbar Color for Selected Textarea ElementsIf you want different textarea elements to have different classes, you'll need to use classes. This is where you create a class in your stylesheet, then use that class from within your form element. Like this:
This code results in: More OptionsIf you want more control over the scrollbar color, you can use a bunch of other properties. Here they are - their names are reasonably self explanatory. Try experimenting around with different colors to see the different effect it has on your scrollbars.
This code results in: |
Sponsored Links
Need Website Content?
Get unique, quality digital content for your website.
|