Very basic question I think. I have a website where some pages are likely to fit within the viewable vertical area of the browser, and others won't (a lot of sites must be like this).
When users browse from one page to another on the desktop browser, the vertical scroll-bar therefore appears and disappears, depending on the page. The affect, is that the nicely centered page keeps on shifting by the width of the scroll-bar when the user just selects another navigation link - what's the easiest way to stop this happening, without making all my web pages the same height?
Second part - why do desktop browser not just reserve the vertical scroll-bar area, perhaps there's a way to force them?
This does it (doesn't work with IE6):
body { overflow-y: scroll; }
If you also want to always show the horizontal scroll bar, use this:
body { overflow: scroll; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With