Dec
20

Here’s the scenario… you just finished your rock-solid CSS design and your page looks wonderful. Currently your viewing it in a nice big browser window and there’s no vertical scrollbar. Mmmm…. very nice! Then you click to another page in your template – a very long page – when “boink!” your whole page shifts to the left by about 20pixels?!?!

“What the crazy just happened!?”
Ah… The scrollbar appeared and bumped my page over….

How to fix it? = Always show the scrollbar

In your CSS just add this line:

html            { overflow:-moz-scrollbars-vertical; overflow-y: scroll; }

Presto your scrollbar problems have been solved!

  1. Trevor says:

    Thats FF only.
    Use this for all browsers.

    html { overflow-y: scroll; }

  2. Good point… thanks Trevor.

Your turn...


« | »