473,320 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Obtaining size of the scrollbar

Is there anyway to obtain the width of the scrollbar? I've tried

var sb = document.body.offsetWidth-document.body.clientWidth ;

but this does not appear to be correct.

Thanks,
Joel
Jul 23 '05 #1
3 3008
DU
Joel wrote:
Is there anyway to obtain the width of the scrollbar? I've tried

var sb = document.body.offsetWidth-document.body.clientWidth ;

but this does not appear to be correct.

Thanks,
Joel


For which browsers? and which browser versions? and for which rendering
mode?
Does your question really matter if your webpage design is scalable?

DU
Jul 23 '05 #2
Joel wrote:
Is there anyway to obtain the width of the scrollbar? I've tried
var sb = document.body.offsetWidth-document.body.clientWidth ;
but this does not appear to be correct.

Visit the following page with different browsers to see what you're up against ;-)
http://cross-browser.com/x/test/clientheight.html
Jul 23 '05 #3
Thanks for the info. I'll check it out.

Joel
"Mike Foster" <mi********@mfosternospam.com> wrote in message news:<opsavs7e06vseoz3@p42000>...
Joel wrote:
Is there anyway to obtain the width of the scrollbar? I've tried
var sb = document.body.offsetWidth-document.body.clientWidth ;
but this does not appear to be correct.

Visit the following page with different browsers to see what you're up against ;-)
http://cross-browser.com/x/test/clientheight.html

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: syed_saqib_ali | last post by:
Please take a look at and run the code snippet shown below. It creates a canvas with vertical & Horizontal scroll-bars. If you shrink the window to smaller than the area of the canvas, the...
2
by: gregl | last post by:
Anyone know how to obtain the true size of the html document's body? The control contains the size that the control was set to. The body object appears to contain the same size. That information...
0
by: syed_saqib_ali | last post by:
Below is a simple code snippet showing a Tkinter Window bearing a canvas and 2 connected scrollbars (Vertical & Horizontal). Works fine. When you shrink/resize the window the scrollbars adjust...
1
by: syed_saqib_ali | last post by:
Below is a simple code snippet showing a Tkinter Window bearing a canvas and 2 connected scrollbars (Vertical & Horizontal). Works fine. When you shrink/resize the window the scrollbars adjust...
1
by: VINAY | last post by:
Dear All, The subject line could be bit confusing. So let me explain in details, please have patience. I have developed an ActiveX Control(Combo Box Control) in VB6 for a touch screen...
3
by: spielmann | last post by:
Hello I want to change the scrollbar size of windows, How can I do that with vb.net I have find this in VB6 but how can we convert simply this code. thx
8
by: Boni | last post by:
Dear all, imagine this is scroll bar. Min|-------------|scroller|---------|Max The position of scroller is set with Value. How do I change the width of scroller? Thank you in advance, Boni
1
by: Jenny | last post by:
Dear all, I have one select which lists one visible element. I want this select can show scrollbar after I click its down arrow, so that i can use the scrollbar to select the element i want. ...
7
by: =?Utf-8?B?Sm9obiBTdGFnZ3M=?= | last post by:
Hello, Please read this all before giving an answer :) I'm doing some troubleshooting on a web application that my company wrote. It's written in asp.net 1.1. The error that the Event viewer...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.