This is a discussion on Manipulating scrollbar colors using CSS and JavaScript within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Manipulating scrollbar colors using CSS and JavaScript Hi friends this HTML code works fine in IE6+. but it does not ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Manipulating scrollbar colors using CSS and JavaScript Hi friends this HTML code works fine in IE6+. but it does not support other browser (Firefox and etc.,) Please help thanks in advance <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> <style type="text/css"> .news { scrollbar-3dlight-color:#009900; scrollbar-arrow-color range;scrollbar-base-color:#00CC00; scrollbar-darkshadow-color:#009900; scrollbar-face-color:teal; scrollbar-highlight-color alegreen;scrollbar-shadow-color:#000000; color: #000; background-color: #fff; width: 100px; height: 150px; overflow: auto; } </style> </head> <body> <div class="news"> Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample textSample text Sample text Sample text Sample text Sample text Sample text </div> </body> </html> |
| Sponsored Links |
| |||
| <script language="JavaScript"> function scrollBar(line,face,theme) { if (!line||!face) { line=null; face=null; switch(theme) { case "blue": var line="#78AAFF"; var face="#EBF5FF"; break; case "orange": var line="#FBBB37"; var face="#FFF9DF"; break; case "red": var line="#FF7979"; var face="#FFE3DD"; break; case "green": var line="#00C600"; var face="#D1EED0"; break; case "neo": var line="#BC7E41"; var face="#EFE0D1"; break; } } with(document.body.style) { scrollbarDarkShadowColor=line; scrollbar3dLightColor=line; scrollbarArrowColor="black"; scrollbarBaseColor=face; scrollbarFaceColor=face; scrollbarHighlightColor=face; scrollbarShadowColor=face; scrollbarTrackColor="#F3F3F3"; } } function colorBar() { var w = document.body.clientWidth; var h = document.body.clientHeight; var x = event.clientX; var y = event.clientY; if(x>w||y-3>h) scrollBar('#000080','#BFDFFF'); else scrollBar(null,null,"neo"); } if (document.all) { scrollBar(null,null,"neo"); document.onmousemove=colorBar; } function offscreen(){ scrollBar(null,null,"neo"); } document.onmouseout=offscreen; </script> |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find similar Colors | Balasubramanian.S | C# Programming | 2 | 09-19-2007 09:40 AM |
| Why the colors on my page look different when viewed on a Mac and a PC? | oxygen | HTML, CSS and Javascript Coding Techniques | 1 | 07-27-2007 03:57 AM |
| How can I have two sets of links with different colors? | oxygen | HTML, CSS and Javascript Coding Techniques | 1 | 07-27-2007 03:43 AM |
| Set Position of Browsers Scrollbar using Javascript ? | kingmaker | HTML, CSS and Javascript Coding Techniques | 1 | 07-19-2007 12:33 AM |
| Colors and fonts | sanray316 | Web Design Help | 4 | 03-25-2007 10:29 PM |