johnpezzetti.com
Removing vertical scrollbar jump / shift problem, a javascript fix for all browsers at John Pezzetti's Blog
http://www.johnpezzetti.com/2011/01/31/removing-vertical-scrollbar-jump-shift-problem-a-javascript-fix-for-all-browsers
Removing vertical scrollbar jump / shift problem, a javascript fix for all browsers. You’ve probably noticed it before…or maybe not. If you’re navigating through pages of a site, some of which have scrollbars and some of which don’t, the while site will shift 20px every time you load a page that has scrollbars. This is true in all modern browsers (IE8, FF2.5 , Opera, Safari, Chrome). In fact, the only browsers that I didn’t experience this in were IE7 and IE6. Enough said, here’s the code. Document.b...