Web Guide  > webguide > 6. Construction > 6.3 Use of style sheets > 6.3b Cascading Style sheets (CSS) and browser compatibility

6.3b Cascading Style sheets (CSS) and browser compatibility

Guideline

CSS and browser support

As with HTML, there are rules for CSS that provide standards on how browsers should display style rules. The problem is that these rules are not always followed and Web browsers have been inconsistent in their support of CSS.

To design pages with CSS, it is necessary to know not only the standards, as presented in the CSS Specification, but also to understand how different browsers' quirks and flaws affect the Web design results.

Cascading Style Sheets are designed to degrade gracefully. That is, if CSS rules aren't recognized, the page should still be usable and the content accessible. Because the presentation is separated from content, the content should be able to stand on its own, in an un-styled way, if the presentation is removed.

Developing Web sites using CSS requires knowing what works in different browsers but also what happens when it doesn't work. It may be as simple as the style not being applied correctly and a bit of decoration being lost, or it may be as serious as the entire layout being disrupted and content being lost.

The good news is that the problem is slowly being resolved and with each new major browser release CSS implementation is better than the last.

CSS 3

Browser support of CSS 1 and CSS 2 is now fairly widespread. There are a few glitches here and there, but in general, planning a CSS Web page using these specifications works fairly well. Where there is trouble is with CSS 3. While some CSS style rules are very well supported, others have little or no support in Web browsers.