Websites jumping again in Firefox 3

In Firefox, when viewing fixed width sites that are centred in the browser window using CSS, switching between pages that are longer and shorter than the browser's viewport causes them to jump sideways by about 15px.

This happens because Firefox, unlike IE, only displays a vertical scrollbar if the page's length is longer than the viewport.

To get around this, I've always added a line of CSS to the top of my stylesheets to force a vertical scrollbar to appear in Firefox:


Today, with the release of Firefox 3, I've discovered that this fix no longer works!

After Googling around and testing various alternatives, the new fix turned out to be quite simple.

All I needed to do was to increase the minimum height percentage slightly. 100.2% works fine.