Topic awaiting preservation: width of scrollbar |
|
---|---|
Author | Thread |
Maniac (V) Inmate From: Charles River |
posted 06-04-2002 04:28
I have a code that needs to know the width of the window. I use the default instructions for IE and NE: document.body.clientWidth, document.body.clientHeight, window.innerWidth, window.innerHeight, document.body.clientHeight, document.body.scrollLeft, document.body.scrollTop, window.pageXOffset and window.pageYOffset, but it seems that IE considers the vertical scrollbar width automatically but Netscape (Gecko) and Mozilla don't. What to do? Is there a way to know the width of the vertical scrollbar? |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 06-04-2002 04:37
No. Usually it's 16 pixels, but you can't be sure of that. |
Paranoid (IV) Inmate From: Dublin, Ireland |
posted 06-06-2002 19:50
Id try work around it. Ive made plenty of designs in the past that just wouldnt work because of that. Mostly with Frames, I wanted to know the scrollbar width so I could line it up with the frame above it. What is it exactly your doing ? |
Maniac (V) Inmate From: Brisbane, Australia |
posted 06-06-2002 19:56
Default windows scrollbar width is 16 pixels. |
Maniac (V) Inmate From: Charles River |
posted 06-06-2002 21:07
I'm using javascript to add a bar atop the page. See live sample at my main page: http://www.viol.net/mohaa |