Log in

View Full Version : css validation problems



tryitout4me
05-27-2010, 03:48 PM
Hi,

This is madhu. I designed a website, in that i used some jquery components and css3 code. While going to w3c validations its showing an error of css3 code.

Property -moz-border-radius-topleft doesn't exist
Property -webkit-border-top-left-radius doesn't exist
so on............

can any one quit me out from this PLZ

Note: Validations should be with "zero errors"

brudawson
06-04-2010, 11:24 AM
CSS validator checks your Cascading Style Sheets in the same manner. make sure that they comply with the CSS standards set by the W3 Consortium. There are a few which will also tell you which CSS features are supported by which browsers. Since not all browsers are equal in their CSS implementation.

jscheuer1
06-04-2010, 04:00 PM
For strict validation, you cannot use:


-whatever-something

styles. Any style property that begins with a dash is proprietary to a particular browser or other software engine. Some of the more common ones:

-o- Opera
-webkit- Safari, perhaps Chrome also
-moz- Firefox and other Mozilla based browsers

At the same time, many of these proprietary properties are css3 equivalent. With those you can just remove the -whatever- part. But some use different syntax than the css3 standard, and some browsers may support their own version but not the css3 version. Some are outdated even in current versions of browsers that once used them, having already been replaced by a standard method.

If your goal is 100% validation, you must either not use these properties or hide the proprietary properties from both the validator and from all browsers that don't recognize them. This can often be done with feature detection via javascript. Browser 'sniffing' is also used, but is less relaible than well thought out feature detection. Either way, now your page is limited and must degrade when javascript is unavailable. However, most developers in your position don't sweat it. During this transitional period from css2 to 3, they use what works. It's not that they don't validate their css, rather they make exceptions for some of these proprietary properties. You should only use those that actually work, and only those that are actually required for the effect you want in browsers that might view your page(s).