Yesterday I gave advice to someone on this board to use:
Code:
html {
overflow-y: scroll;
}
What this does is forces browsers to always display a vertical scroll bar regardless of if the page needs it or not. This is useful for avoiding the "jump-in" effect that happens when content has to stretch the browser window.
I've been using this method for a while now, but only just realized it doesn't validate as CSS2 (it does however validate as CSS3).
I always keep my markup validated... but I have a bad habit of not validating my style sheets
So my question is, for superficial CSS rules such as these should I really be striving for W3 validation? I'm a pretty anal webmaster and I try to make sure all of my code is of good form, so when I see the W3 validator yell at me it really bothers me. Should I just be content with validating as CSS3?
Engineers aren't boring, we just get excited over boring things.
There is no problem with that sort of code. All validation does is point out syntax errors and deprecated code, especially for CSS. If it is syntactically correct, and not deprecated (the opposite, it's in the CSS 3 standard not CSS 2), it really is not a problem. If it didn't validate at all, I would start to get worried.
Great wit and madness are near allied, and fine a line their bounds divide.
I dunno why I had an issue with it. I guess my understanding was CSS3.0 is up-and-coming, something that isn't really being used yet. (Even though I'm well aware most browsers have adopted several CSS3 rules)
Engineers aren't boring, we just get excited over boring things.
Bookmarks