JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 14th, 2006, 07:04 PM
ralphch ralphch is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Buenos Aires, Argentina
Posts: 154 ralphch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 48 m 49 sec
Reputation Power: 12
Send a message via MSN to ralphch
Question Replacing the default scrollbar in a div

Hi,

I'm using the "overflow:auto" CSS property so that I can vertically scroll inside a DIV. However, I was wondering if there is any script or JavaScript function that I can use to replace the default scrollbar for something nicer, like custom up and down arrows.

Any ideas will be appreciated.

Thanks,
Ralph

Reply With Quote
  #2  
Old February 14th, 2006, 08:07 PM
darinpeterson darinpeterson is offline
Pure Octane with Sirius 20
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: Boise, ID
Posts: 198 darinpeterson User rank is Corporal (100 - 500 Reputation Level)darinpeterson User rank is Corporal (100 - 500 Reputation Level)darinpeterson User rank is Corporal (100 - 500 Reputation Level)darinpeterson User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 7 h 4 m 34 sec
Reputation Power: 10
Changing Scroll Bars.

Check here to use CSS to change the color.

Reply With Quote
  #3  
Old February 14th, 2006, 08:11 PM
ralphch ralphch is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Buenos Aires, Argentina
Posts: 154 ralphch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 48 m 49 sec
Reputation Power: 12
Send a message via MSN to ralphch
Thanks for the reply. However I was hoping to change the whole scrollbar itself for something else that will look nicer. Is there a way to do this? I'm guessing probably with Javascript. Thanks again.

Reply With Quote
  #4  
Old February 14th, 2006, 08:37 PM
Markisdee's Avatar
Markisdee Markisdee is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2003
Posts: 2,346 Markisdee User rank is Colonel (50000 - 60000 Reputation Level)Markisdee User rank is Colonel (50000 - 60000 Reputation Level)Markisdee User rank is Colonel (50000 - 60000 Reputation Level)Markisdee User rank is Colonel (50000 - 60000 Reputation Level)Markisdee User rank is Colonel (50000 - 60000 Reputation Level)Markisdee User rank is Colonel (50000 - 60000 Reputation Level)Markisdee User rank is Colonel (50000 - 60000 Reputation Level)Markisdee User rank is Colonel (50000 - 60000 Reputation Level)Markisdee User rank is Colonel (50000 - 60000 Reputation Level)Markisdee User rank is Colonel (50000 - 60000 Reputation Level)Markisdee User rank is Colonel (50000 - 60000 Reputation Level)Markisdee User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 10 h 59 m 31 sec
Reputation Power: 577
Send a message via AIM to Markisdee
Quote:
Originally Posted by darinpeterson
Check here to use CSS to change the color.
Keep in mind that this solution is IE only.

@ralph: Yes, this is possible. (However, the only way I can think of is with scrollTo and an Iframe.) It is very frowned upon however, because users with JS disabled will not be able to view some of your content if you set it up like that. And I'm sure many users are happy with their scrollbars. When "something nicer" compromises compatability, often you need to give that something up.
__________________

Reply With Quote
  #5  
Old February 15th, 2006, 11:04 AM
ralphch ralphch is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Buenos Aires, Argentina
Posts: 154 ralphch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 48 m 49 sec
Reputation Power: 12
Send a message via MSN to ralphch
Hi, thanks again for the replies. However, I'm going to be using this on an Ajax-based application so the user will need Javascript enabled. Would there be a way of doing this? Thanks!

Reply With Quote
  #6  
Old February 15th, 2006, 01:03 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,835 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 1 Day 22 h 40 sec
Reputation Power: 4192
Look into overflow:hidden and the scrollTop and scrollLeft properties.
__________________
Spreading knowledge, one newbie at a time. I'm available for hire at Dynamic Site Solutions.

Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

Remember people spend most of their time on other people's sites (so don't violate web design conventions).

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Replacing the default scrollbar in a div

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap