Valid CSS

From CSS Discuss

Jump to: navigation, search

Valid CSS is referring to the process of testing css against the css specifications to ensure there are no invalid CSS statements. The validation service at is an excellent validation service. Also some CSS editors validate as you work; Top Style and Style Master are two such examples.

A number of the methods to hide CSS from browsers are perfectly valid css including @import, using comments in ways that older browse rs fail to understand and leaving out whitespace body>html that will cause certain browsers to ignore all the rules within.

If the style sheets validate, then all browsers that comply with the standards should be able to use the styles properly. It's also an easy way to check for typos and other silly errors.

However, in my personal opinion, valid css doesn't make a good website, and a good website doesn't necessarily need valid css. For example, using the Alpha filter to show images in IE is, in my opinion, a perfectly good use of css for design, but doesn't validate - Leszek

Personal tools