It depends largely on the context:
- Do you want to create an iframe with stylized scrollbars that other people can place on their site?
- Or are you trying to create some other content that is hosted on your site through an iframe?
If you have control over the contents of the iframe, then this is easy to do. I have successfully used http://livepipe.net/ .
Custom scrollbars usually work by putting content in a and then moving that element relative to the parent div in javascript.
EDIT 1:
This is a detailed page. Just start editing the values. http://livepipe.net/control/scrollbar
You will find out that this is correct when you load your page not in an iframe, fancy scrollbars are 100% higher than the height of your browser, regardless of height.
It may also be useful to add a function to recalculate the height of objects and position the bottom control when the window is resized. Although, this is easier to do with jQuery than in PrototypeJS.
EDIT 2: Here is a working example that I prepared: http://pastebin.com/gvtnLANQ
source share