A List Apart, for People Who Make Websites. 
  Fear of Style Sheets 4: Give Me Pixels, or Give Me Death.

PROMISE AND PERFORMANCE

<<< By now, we all know that CSS (Cascading Style Sheets) is an important standard. One that allows designers to specify the font family, size, margins, and leading of type on the web; permits designers to create advanced web layouts without abusing HTML; and enables web designers, HTML practitioners, and programmers to separate design elements (presentation) from content.

This ability to separate presentation from content further empowers web designers to create attractive sites without excluding visitors who cannot use graphical browsers, and paves the way for the expansion of the web beyond the desktop computer and onto a variety of hand-held and other Internet-enabled devices. (More on that world beyond the desktop in a future issue of ALA).

We also know that many times our best CSS efforts fail in one browser or another.

CSS doesn't kill websites.
Browsers kill websites.

Even though the CSS Level 1 standard was finalized in 1996, the first browser to meaningfully support it did not appear until the year 2000 (Internet Explorer 5, Macintosh Edition). Netscape Navigator 6, due around Christmas 2000, should also fully support CSS Level 1. And Opera Software's Opera 4 browser was designed to comply with CSS-1 and beyond. We have not run tests to verify Opera's claims, but the browser was designed by the father of CSS, and we have little reason to doubt that it gets even the most academic nuances correct.

That's the good news. The bad? IE5/Mac and Opera 4 are used by a minority, and Navigator 6 is still in beta.

Internet Explorer 5 for Windows, used by the majority, comes close to perfection but misses the mark in a few critical areas, and may not completely support Style Sheets before the release of IE6. And Netscape Navigator 4, still used by tens of millions, does such a poor job of handling Style Sheets that it has been known to crash upon encountering them, as previously detailed in these pages. (The Day the Browser Died)

Faced with these inconsistencies, many web designers have avoided using CSS altogether. Others have gone ahead and fully exploited the power of CSS in spite of the fact that it fails in IE3/AOL, can crash Navigator 4, and delivers wildly inconsistent results in newer browsers.

Other web designers and developers have followed the "No-Fault CSS" plan previously outlined in ALA's "Fear of Style Sheets" series, whether they picked it up here or figured it out on their own.

Fear of Style Sheets
Fear of Style Sheets 2
Fear of Style Sheets 3

Still others - tricky devils - have created platform and browser detection scripts to serve a variety of "appropriate" Style Sheets to specific user agents. For instance, serving one Style Sheet to an IE4/Mac user and another to a Navigator 4 user on Windows NT. This approach was always unpleasantly complicated and almost always added to the bandwidth requirements of each web page, but at least it used to work. It no longer works. Throw it away.

What works? Pixels - or no sizing at all. How can we make this audacious claim? (Assuming The Master List did not convince you.) Let's look at the alternatives: >>>

  1. Give Me Pixels or Give Me Death
  2. Promise vs. Performance
  3. Font Size Challenges: Points vs. Pixels
  4. Keywords to the Wise
  5. Relatives and Percentages
  6. Wrapup

 

 
  Current issue.
Read previous issues.
Join the discussion list.
Search or browse previous discussion lists.
News, help and info.
Web design contest from H5 and ALA2.

"Browser and platform detection no longer works. Throw it away. What works? Pixels. Or nothing at all."

Resources:
The Master List
(Updated link)
"The mother of all CSS charts," listing every aspect of the CSS spec and identifying how well it is supported by Netscape 4.x and Internet Explorer 3.x, 4.x, and 5.x for both Macintosh and Windows 95, and Opera 3.6 for Windows.
WARNING: Big file, long load time.

Permanent bookmark:
This article is permanently archived at /stories/fear4/

© 2000   A List Apart
[Jeffrey Zeldman & Brian Platz]