WebsiteBaker Support (2.8.x) > Templates, Menus & Design
detect the presence of a scrollbar?
(1/1)
snark:
maybe not exactly the right topic but I do not know where to place it
Is it possible to let php detect wether the website has a browser-scrollbar at the rightside
If so I think I can get the website/template stop jumping these tiny bits due to the scrollbar appearing on half of the pages.
Luisehahne:
Not php but css. But browser handle it in a different way. Google is your friend
Dietmar
Argos:
The jumping does not occur in all browsers. IE is clever and reserves space for the scrollbar all the time. Other browsers are not as clever and don't do that, thus creating content to jump when it's longer than the viewport. You can let other browsers behave by adding this line to your stylesheet:
html {overflow-y:scroll;}
No need for scripting!
Luisehahne:
Hi,
if you a double scrollbar in IE try this
--- Code: ---html {overflow: -moz-scrollbars-vertical;} /* Force firefox to always show room for a vertical scrollbar */
--- End code ---
Dietmar
Navigation
[0] Message Index
Go to full version