[Cascading Style Sheets]
[Previous page] [Next page] [Section contents page]

Limitations of Style Sheets

After reading the previous page, you may be wondering, "So why not use style sheets for all web pages?" The first part of the answer is: we probably ought to. The second part, though, is: it's not quite as easy as it ought to be yet.

The problems are multiple and related. Now that CSS is supported by both Internet Explorer and Netscape, one of which is used by the vast majority of web surfers, there are still a large number of users who who have older versions of Netscape than 4.0, and even some using IE 2.0. That in itself is not a big problem, so long as you take care to insure that pages using styles will render acceptably by browsers that don't support CSS. A second and more serious obstacle is that as of now, the implementation of CSS varies between Netscape and IE, and even between IE 3 and 4. To get around this, developers have two options:

  1. write very simple style sheets that will work for all three browsers
  2. use a JavaScript to detect the user's browser type and link different style sheets (and write different lines of code in some cases) accordingly. A script that will do this is presented later in this guide

In addition, web authors should consider the following:

  • If you are working on an intranet where users do not have a CSS-aware browser, there isn't much point in using style sheets
  • If you do want to use style sheets for a general Internet audience, you should be careful to insure that users with browsers that don't support CSS will still get acceptable renderings of your pages

If you want to go the latter route, I'll offer some suggestions later to help make your pages friendly to both CSS and non-CSS browsers, but here let me offer a couple of general cautions:

  • If you're thinking of using style sheets, but leaving in all the usual formatting code for non-CSS browsers, don't: that defeats the purpose in every way (your local formatting will override the styles, and you'll just be using more bandwidth to transfer styles that don't do anything)
  • If you're thinking of maintaining parallel sets of pages with and without style sheets, don't: anyone who has been there and done that will tell you that maintaining parallel page sets is a nightmare not to be endured unless 1) you're terribly bored and looking for a way to kill time, or 2) someone is holding a gun to your head and making you do it...

The bottom line here is, if you want to use style sheets for the Internet, be willing to pay the price that some users (hopefully a quickly declining number) will be seeing fairly plain pages.

[Previous page] [Next page] [Section contents page]