I had to make a small website for a class.


If you click on the Resources link. The layout shifts a few pixels width to the right. All pages are linked to the same style sheet so I am not sure what is happening.

Any ideas?

Thank you.

  • Doesn't shift in Safari. The navigation links are pretty much unusable, though. Nathan Duran about 8 years ago
  • Only tested on Firefox. CTK about 8 years ago

2 answers


You need to force a vertical scrollbar to prevent page jog.

see: http://ryanfait.com/resources/forcing-vertical-scrollbars/

Answered about 8 years ago by Tony Crockford
  • You may also need html { overflow-y: scroll; } for Firefox 3.5+ Jeffery To about 8 years ago

I noticed that the page in question is the shortest of all the pages. That may be a clue. Try padding it vertically to test. The only change that I noticed myself was that when it was shorter than the current window it has no scrollbar which caused the positions to shift.

Answered about 8 years ago by kainosnous