...

View Full Version : Browser scroll bar - detectable?



Jodda
04-04-2003, 03:47 PM
Hello,

Is there a way to detect if the browsers scroll bar is shown, my question is only directed to IE browsers. I know there's a reserved area on the right-hand side of approx 20px, but is there a way to detect if content runs off the page and the scroll bar is shown. Thanks very much for any help.

chrismiceli
04-04-2003, 11:25 PM
I don't know if there is a way, but in css, you can use overflow

//i think this is how it is
html {overflow: hidden
}

//might be
body {overflow:hidden
}

mabey that might help for you.

beetle
04-04-2003, 11:35 PM
if ( document.body.scrollHeight > document.body.clientHeight )
{
// vertical scrollbars present
}
else
{
// no vertical scrollbars present
}source: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/om/measuring.asp

Jodda
04-07-2003, 09:23 AM
Thanks chrismiceli for your suggestion but i was looking for a solution in javascript - nice one Beetle your solution works fine, thank you :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum