Page shift when scroll bar is present


Author Message
Rogue Warrior

Posted: 10/17/2010
Quote message 

I've noticed a slight shift in a page when there is a scroll bar in the browser window versus when there isn't. If the length of the Drupal page doesn't cause a scroll bar to appear, the whole page shifts to the right a few pixels and not by an amount equal to the width of the scroll bar (which you might expect). I've tried this in Firefox and Safari.
 
Nicky

Posted: 10/18/2010
Quote message 

If your theme is centered the shift is from half scroll bar.

we can add to stylesheet :

html
{overflow-y: scroll;}

So scrollbar is always here, even for shorter pages.


 
Mark C

Posted: 10/18/2010
Quote message 

I would guess it shifts half the width of the sidebar (half for the left half for the right).
 
zeebeest

Posted: 4/8/2011
Quote message 

Nicky, thank you very much :-):-)

I had the same problem in my Joomla template: the page got a few pixels wider for only about a second when I clicked on certain menu items. It only appeared to happen in IE, not in Firefox.

Adding the html css to the template.css solved the page shift :-).