IT Community - Software Programming, Web Development and Technical Support

Is it possible to create colored scrollbar in the FIREFOX ....

This is a discussion on Is it possible to create colored scrollbar in the FIREFOX .... within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Is it possible to create colored scrollbar in the FIREFOX browser.I could create colored scrollbar in the IE browser ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > HTML, CSS and Javascript Coding Techniques

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-25-2007, 03:30 AM
Archer Archer is offline
D-Web Programmer
 
Join Date: Jun 2007
Posts: 52
Archer is on a distinguished road
Question Is it possible to create colored scrollbar in the FIREFOX ....

Is it possible to create colored scrollbar in the FIREFOX browser.I could create colored scrollbar in the IE browser using CSS?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-27-2007, 05:36 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Thumbs up Re: Is it possible to create colored scrollbar in the FIREFOX ....

Hi Archer

Firefox doesn't support that because changing the browser is messing with the clients preferences and shouldn't be a 'style' setting. But you can do it with javascript if you really need it, But remember some people are visually impaired and have specific settings for their GUI and you'll be messing with it.

Oxygen
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-27-2007, 05:41 AM
theone theone is offline
D-Web Sr.Programmer
 
Join Date: Jun 2007
Posts: 129
theone is on a distinguished road
Thumbs up Re: Is it possible to create colored scrollbar in the FIREFOX ....

Here's what you can do to make this work in all 3 major browsers (IE, Firefox, Opera):

1) use this code:

Code:
<style>
body{
   scrollbar-face-color: #808080; /*/ obviously change this to whatever you want /*/
   scrollbar-arrow-color: #FFFFFF;
   scrollbar-highlight-color: #FFFBF0;
   scrollbar-3dlight-color: #808080;
   scrollbar-shadow-color: #FFFBF0;
   scrollbar-darkshadow-color: #808080;
   scrollbar-track-color: #CCCCCC;
}
</style>
<script>
function selectCode(f){
document.forms[f].elements[0].focus();
document.forms[f].elements[0].select();
}
function changeScrollbarColor(C){
 if (document.all){
   document.body.style.scrollbarBaseColor = C
 }  
}
</script>
2) in the HTML tag of your webpage, delete ANY and ALL ties to W3C! For example, you will see code generated in the HTML tag when you create a new html page in Dreamweaver like this:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Kill all of this so the only thing left is the following:

Code:
<html>
Near as I can tell, what this does is break away from the rules that have been established by the W3 consortium so anything can be read and followed. I don't know why, but it just seems to work. I have tried this script method in all three browsers and it works in all of them.


cheers
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/html-css-javascript-coding-techniques/2704-possible-create-colored-scrollbar-firefox.html
Posted By For Type Date
Is it possible to create colored scrollbar in the FIREFOX .... | Web Hosting This thread Refback 03-09-2008 04:04 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Manipulating scrollbar colors using CSS and JavaScript santhakumar HTML, CSS and Javascript Coding Techniques 1 11-27-2007 06:55 AM
How do I move the scrollbar to a specific position? Pvinothkumar HTML, CSS and Javascript Coding Techniques 3 10-27-2007 12:15 AM
Can anybody explain me how to set horizontal scrollbar for a dropDown control kingmaker ASP and ASP.NET Programming 1 07-27-2007 04:39 AM
Set Position of Browsers Scrollbar using Javascript ? kingmaker HTML, CSS and Javascript Coding Techniques 1 07-19-2007 12:33 AM
How to change the scrollbar color and folder icon in Tree component in Flash Balasubramanian.S Flash Actionscript Programming 2 03-27-2007 11:29 PM


All times are GMT -7. The time now is 09:06 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0