Written on January 10, 2003
CSS is a remarkable technology that will undoubtedly change the way that documents are presented through large swathes of the Internet, especially the Web. Any web author or designer who reads this book is going to salivate to the point of embarrassment over the nascent possibilities in the spec. They are also going to run screaming to the Web Standards Project to beg them to force the browser makers to support the spec to the letter so that they can write cross-browser-compatible code quickly and easily. Tantalizing us with possibilities isn’t what this book is about, though. This book truly strives to be "The Definitive Guide", delimiting what works right now, and how.
The book is essentially a "State of the Union" document that shows you what is implemented in the browsers, how it works, where the bugs are and what, if any, are the workarounds. In this capacity it is hugely useful, but it isn’t always easy to use as a reference. The layout of the book, into chapters based on the effects you wish to use, such as Fonts, Boxes and Borders, and Colors and Backgrounds(sic) is very helpful on the surface, but because the properties, selectors and elements are spread through the text there is no easy way to flip directly to the section you want. The appendix of CSS1 Properties is alphabetical only, so if you don’t know precisely what you’re looking for you’ll have to skim the relevant chapter.
The chapters themselves are often very long, with some examples having related code and some merely described, so it is quite tricky to figure out how to replicate an effect that you find in one of the many figures. In some cases the idealized behaviour is laboriously discussed, and the browser implementation is mentioned only briefly, making for a frustrating read. The prose itself is fairly transparent, and Meyer has peppered his examples with whimsy which eases the read considerably.
There are certain chapters of this book that are "must-read", and others that can safely be mined for tips and samples without being gone over in detail. Chapter 2, Selectors and Structure, and Chapter 3, Units and Values, are essential reading for anyone wishing to use CSS now, or in the future. These chapters are specific, focussed and full of priceless pearls that must have been discovered after hours or days of hair pulling and frustration. Similarly, Chapter 8, Visual Formatting, on the surface an academic interpretation of the CSS1 Specification, is the perfect background for understanding big chunks of CSS of both levels. The last Chapter, CSS in Action, is a good place to start if you are already somewhat familiar with CSS.
One thing the quickly becomes clear when reading this book is that Netscape is the ugly step-child when it comes to CSS. The winner of most of the early battles in the Browser Wars, Netscape is now relegated to flirting with the nurses and giving away half of every pair of shoes. Netscape’s support for even the rudiments of CSS1 are intermittent and riddled with bugs, requiring elaborate workarounds and even the abandonment of useful effects. There is hope that Netscape 6 will come to the rescue, but as feature is added to bug-eaten and crash-prone feature that hope dims. The fact that the smart money in the Netscape 6 release-date pool is on dates in the second half of 2001 is not encouraging.
Ultimately, Cascading Style Sheets: The Definitive Guide, is a good book to have read, especially if you intend to stay at the bleeding edge of web publication, but it is not a great book to have on the shelf. A more useable CSS reference can be found in Web Design in a Nutshell, by Jennifer Niederst or in Dynamic HTML: The Definitive Reference by Danny Goodman.
Filed in: book.