Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Taking_Your_Talent_to_the_Web.pdf
Скачиваний:
5
Добавлен:
11.05.2015
Размер:
9.91 Mб
Скачать

Taking Your Talent to the Web

261

CSS Advantages: Long Term

As indicated, CSS provides a way for web designers to create richly visualized, robustly interactive sites that also might function well outside the traditional web browser environment. As more and more people begin to interact with the Web through new, nontraditional Internet devices—and as more and more powerful web standards are brought to fruition in the browser as well as at the W3C bargaining table—the need to separate content from style becomes even more important. So it’s pretty darned crucial that web designers come to grips with this concept of style/content separation and learn to use style sheets effectively in designing for the Web.

COMPATIBILITY PROBLEMS: AN OVERVIEW

The CSS-1 standard was created in 1996 but was not completely supported by any web browser before the year 2000. As of this book’s publication, it is still imperfectly supported by browsers most often used to access the Web. This has slowed the adoption of CSS in the field given that no client wishes to pay for a site that might not work correctly for many users.

Poor, partial, or incompatible CSS implementations in browsers also have persuaded most web designers who do use style sheets to employ them only in very limited ways. For example, many designers now use CSS to control the fonts on a site. But these same designers continue to use HTML tables to control the layout of text and graphical elements on each page (see Figure 10.2) because poor or incompatible CSS implementations in the browser might otherwise render their layouts illegible. They can even cause one browser to crash (more on that shortly).

262 HOW: Style Sheets for Designers: Compatibility Problems

Figure 10.2

The Daily Report at zeldman.com uses CSS

to control typography but traditional HTML tables to lay out the page. CSScapable browsers are on the market, but so are Netscape 4 and IE3—two old browsers whose support for CSS is problematic. Because Netscape 4 users can crash from CSS layouts and IE3 users can barely see them, an interim approach was taken. When these old browsers have faded into disuse, the same page will be designed entirely in CSS (www.zeldman.com/ coming.html).

We refer to this two-pronged, “safe” approach as No-Fault CSS, a technique we began recommending in 1998 in the A List Apart “Fear of Style Sheets” series:

www.alistapart.com/stories/fear/

www.alistapart.com/stories/fear2/

www.alistapart.com/stories/fear3/

www.alistapart.com/stories/fear4/

The series was designed to evangelize CSS use in spite of browser compliance problems by showing which CSS techniques to avoid and which could be safely used.

Browser companies such as Netscape and Microsoft have sometimes been slow to realize that what is good for designers and web users is also good for browser makers themselves because fewer problems mean fewer complaints and better word of mouth. Nevertheless, by fits and starts, the

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]