The differences between Web page design and Web page implementation can be enormous. Cascading style sheets (CSS) give Web page designers a powerful, sophisticated tool for separating Web page content from formatting. Using CSS to format a nontrivial Web page can be daunting, and even difficult. This book, written by professional, accomplished Web page designers, shows us how to use CSS deftly and efficiently.
Chapter 1 covers the syntax and semantics of a style sheet. The authors also explain how a browser chooses the rules in a style sheet to render a Web page. The next chapter describes the mechanics of white space and positioning. Here, the authors clarify the differences between margin and padding. They then explain the rules that a browser uses to place objects on a page. Chapter 3 covers image management. The authors guide us through techniques needed to use graphic images to create an assortment of effects, including rounded corners and drop shadows.
The next two chapters cover link and list formatting. These chapters show us how to add simple interactivity to links, how to format lists, and how to combine both to create navigation bars. Chapter 6 explains how to use CSS to format tables and forms. The chapter describes how to take advantage of the standard Hypertext Markup Language (HTML) elements for table elements, including headings, footers, rows, columns, and summaries. The chapter also explains how to control the appearance of form elements.
Web page layout with CSS is perhaps the most misunderstood and misapplied part of CSS usage. In chapter 7, the authors succeed in clarifying what many Web designers consider to be the most difficult part of CSS implementation. They accomplish their goal as they have in other chapters: they start with simple examples, and then move gradually and logically to more complicated efforts. Chapters 8 and 9 are devoted exclusively to specific workarounds, and to compromises that Web designers make to ensure that Web browsers render pages as intended. The next two chapters are case studies that demonstrate how to apply many of the previously covered techniques in a production Web site. We get to see why a designer chooses a particular technique, and how the designer implements it.
Every chapter in the book carefully distinguishes between the behaviors described by the CSS standard and the behaviors implemented by the most popular Web browsers in use today (Internet Explorer, the Mozilla family of browsers, and Safari). The authors always prefer standard usage, but are pragmatic enough to work around bugs or nonconformant behavior in these browsers.