Jump to content

ScrollBar


aamberker
 Share

Recommended Posts

Hi,I have placed the ScrollBar code in CSS and then the .css name in HTML.< In .css file, the code looks >.scrollbar{ scrollbar-face-color: #d0d0d0; scrollbar-highlight-color: #dbdbdb; scrollbar-shadow-color: #8a8a8a; scrollbar-arrow-color: #00498c; scrollbar-darkshadow-color: #565656; scrollbar-base-color: #ffcf21; scrollbar-3dlight-color: #f3f3f3; scrollbar-track-color: #00498c;}< In .html file, I have placed the .css file name at ><!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" class="scrollbar"><head>The Scrollbar looks cool in IE Web Browser but doesn't show-up in Mozilla Firefox.How do I fix this?Regards,Amit ~

Link to comment
Share on other sites

Ouch.Let's make some corrections first. Usually, classes never go inside the <head>, <html> or <body> since they can be targeted by the CSS. Take off class="scrollbar" and in your CSS file change:

.scrollbar{scrollbar-face-color: #d0d0d0;scrollbar-highlight-color: #dbdbdb;scrollbar-shadow-color: #8a8a8a;scrollbar-arrow-color: #00498c;scrollbar-darkshadow-color: #565656;scrollbar-base-color: #ffcf21;scrollbar-3dlight-color: #f3f3f3;scrollbar-track-color: #00498c;}

To this:

html, body {scrollbar-face-color: #d0d0d0;scrollbar-highlight-color: #dbdbdb;scrollbar-shadow-color: #8a8a8a;scrollbar-arrow-color: #00498c;scrollbar-darkshadow-color: #565656;scrollbar-base-color: #ffcf21;scrollbar-3dlight-color: #f3f3f3;scrollbar-track-color: #00498c;}

Now the reason that code isn't working in Firefox is because that code you have is a Microsoft code, and really isn't standard CSS, so only Internet Explorer will see it. The other browsers like Firefox simply ignore this code. But, if you REALLY want to change the scrollbar colors then look for a JavaScript solution, Google can help.

Link to comment
Share on other sites

Hi RahXephon,Thanks for your response.As per your comments, I have removed the "class="scrollbar" from my HTML file and instead of ".scrollbar{" in my CSS file, I have changed it to "html, body {"...What sort of JavaScript solution do I need to fix this issue? Where exactly I need to place JavaScript inmy HTML file?You said something at the end... I didn't get you... wheww!!!.. What does that mean?

Link to comment
Share on other sites

Well there's lots of different methods on how to implement scripts like this into your page, most sites give you instructions on how to add them into your pages. As for me having an actual JavaScript method, I don't. But like I mentioned you can do a Google search for javascript color scrollbar and check out any results. I recommend looking for these scripts in Firefox so you know right away if they work on any example page the site may have.Are you talking about my signature? The code part at the very bottom of my post? That's nothing to worry about, lol.

Link to comment
Share on other sites

Hi RahXephon,Thanks for the infor... Okay - I will do a Google search for javascript color scrollbar and check out any results. I guess, the javascript should be in between <head> </head> ... Am I making sense?Oh Yeah!!!.. YUP!!!... I was talking about the code part at the very bottom of your posts... HUMMMM.. So thats your signature.. hummmmm.... LOLAdd me as your friend :)

Link to comment
Share on other sites

You're welcome. Yup. Most of the time JavaScripts are placed in the <head> and </head> sections of the page. Added.

Link to comment
Share on other sites

By the way, the very first result from the search for "javascript color scrollbar" will not work - it is using the IE-specific code. The second result seems to be the same as the first with superficial wording differences :) . The third link's solution won't work outside of IE either, and neither will the 4th, 5th, 6th, 7th, 8th, 9th, or 10th solutions. Oh dear... umm...

Link to comment
Share on other sites

< In .css file, the code looks >.scrollbar{scrollbar-face-color: #d0d0d0; scrollbar-highlight-color: #dbdbdb;scrollbar-shadow-color: #8a8a8a;scrollbar-arrow-color: #00498c;scrollbar-darkshadow-color: #565656; scrollbar-base-color: #ffcf21;scrollbar-3dlight-color: #f3f3f3; scrollbar-track-color: #00498c;}< In .html file, I have placed the .css file name at ><!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" class="scrollbar"><head>The Scrollbar looks cool in IE Web Browser but doesn't show-up in Mozilla Firefox.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...