That's a good one, I haven't used that before I don't think. It's a tricky subject actually. Since some browsers experience the "jump" between not having a scroll bar and having a scrollbar (on centered sites) and some do not.
But doesn't that apply to all browsers? IE, for example, doesn't need that. It will automatically show a scroll bar regardless of content height. Not 100% sure what Safari does.
Both options listed in this thread don't validate:
html Value Error : overflow -moz-scrollbars-vertical is not a overflow value : -moz-scrollbars-vertical html Property overflow-y doesn't exist in CSS level 2.1 but exists in [css3] : scroll
btw, is there a way to say that your CSS file is css3?
html { overflow: -moz-scrollbars-vertical; }Done! This can be a very frustrating problem for people that don't quite see exactly what is causing the page shift.
The technique I typically use is:
...which actually doesn't validate (who cares).
A while back I tried a bunch of different ways:
http://css-tricks.com/eliminate-jumps-i ... croll-bar/
hehe me too :) and no it dosnt validate lol
Both options listed in this thread don't validate:
btw, is there a way to say that your CSS file is css3?
Nope, but I wouldn't be surprised if it popped up in the future.
In the meantime we'll just have to do
http://jigsaw.w3.org/css-validator/validator?uri=http://css-tricks.com/&profile=css3
<a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3">Valid CSS 3</a>