Is this possible

H

harry

Using IE 5.5 (sp2) & no other browser

I have a scolling div & would like to know if there's anyway possible to
tell if the vertical scroll bar is being displayed?

My web page use % sizes so the scrollbar appears/disappears depending on
resolution etc... I want to align some text underneath the div but as the SB
takes up some of the area my alignment goes way out when the SB is
displayed!

Presumably I could check this in the onresize() event but have no idea if
it's possible to tell if the sb is visible or not?

many thanks (& hopefully I've made some sense?)

harry
 
S

Safalra

harry said:
I have a scolling div & would like to know if there's anyway possible to
tell if the vertical scroll bar is being displayed?
My web page use % sizes so the scrollbar appears/disappears depending on
resolution etc... I want to align some text underneath the div but as the SB
takes up some of the area my alignment goes way out when the SB is
displayed!

Presumably you're using overflow:auto in the CSS. If you change this to
overflow:scroll then you'll always get a scrollbar, and then you won't
have to worry about detecting it. I don't think there's anyway to
detect it otherwise, even using the Microsoft 'extensions' to
Javascript.
 
H

harry

Yes mate, I'm doing just that - thanks for confirming what I thought would
be the case!

cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top