View Full Version : How can I find the width of the scroll bars?

09-24-2003, 10:28 PM
I'm designing a few nifty little things for my website and I have a page where it bounces around the screen (http://www.freewebs.com/magic9821/bobby.html) but I don't know how to determine the width/height of the scroll bars and I don't want to just approximate because I want it to work on every computer and I know people who change their scroll bar sizes. Is there a manner in which I can find this out?

Roy Sinclair
09-24-2003, 10:32 PM
Try defining a div where it will have access to the full width of the browser window, get the width of that div and subtract it from the "clientWidth" value. The difference should be the width of the scrollbar or zero if it's not present.