Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How can I find the width of the scroll bars?

    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?

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Check out the Forum Search. It's the short path to getting great results from this forum.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •