Any book that starts off with an appropriate George Carlin quote can't be bad
-- though the same can't be said for books with exclamation points in their
titles -- but in this case it's true: CSS, as it was defined in the late 1990s
was (and is) a great idea; but, as the quote suggests, if you're trying to set
standards being slightly ahead of what browsers already do isn't that useful.
As the authors see it there is an opportunity now with Internet Explorer,
after slumbering for several years, being actively developed again and the
standards group behind CSS working on things that will make designers' lives a
lot easier, plus newer browsers that are aggressively implementing these ideas
as they are developed. Together, these factors create an opportunity for web
developers to move away from a lot of the hacks currently used to create
layouts that work cross-browser.
The book advocates developers supporting the newest web standards. To that end the five chapters of this slim, 110-odd page, book outlines a bit of history of how browsers and web standards evolved since Microsoft won the first browser war in the late 1990s. Afterwards the book teaches readers how to use CSS tables before looking forward to what other things designers can look forward to in CSS 3.
The authors argue that in order to ensure browsers continue to support new standards, developers must make use of these standards so browser developers have a reason to support them in the first place. If this sounds familiar it is- Jeffrey Zeldman made basically the same point in 2001 with "To Hell With Bad Browsers." What's different this time is, not only is Microsoft serious again developing Internet Explorer and supporting web standards, but at least two new browsers with strong standards support have arrived and are eroding Internet Explorer's once unassailable lead in web surfers.
Point made, the book then starts into creating layouts using CSS tables, something I had not heard of before I read this book. Essentially CSS tables means that the display property now lets you specify things like "display: table-cell" or "table-caption" that cause the element to behave as if it was a <td> or <caption>. The good news is it will make using tables to build layouts, as has been done since the mid-1990s un-necessary-- I say "will", because at this time, Internet Explorer 7 does not support them-- we'll have to wait for IE 8 (currently a release candidate) to arrive for that.
After all the good news about CSS tables comes the problem today: what to do about all those people using Internet Exporer 7 and earlier that don't support CSS tables? Well the short answer is there are three options: provide a simplified layout via alternate style-sheets, use supported CSS to create the layout or just ignore those browsers. The authors are realistic in saying that ignoring anywhere from maybe 50% (about the proportion of IE users on YYZtech) and up of your visitors isn't a viable choice for mainstream websites just yet; so that leaves two alternatives. The book shows how set-up style-sheets that only IE will pick up and a few pages on using floats and a lot of the CSS tricks web designers have been using for years to achieve similar layouts to the ones done previously with CSS tables. By then end of the chapter readers will know how to adapt their layouts to work in older browsers.
The last chapter of the book looks at what kinds of layout tools will be available once CSS 3 is available. CSS 3 (officially CSS level 3) is being developed in a modular fashion; that means that parts of the specification will be finalized before all of it is ready to go. Chapter five looks at some of these features, though only columns are currently supported in Webkit/Safari/Chrome and Firefox via "webkit-" and "moz-" modifiers respectivly. Other features like grids are presented based on the current specifications though it looks like playing with them is a bit further off.
In conclusion, this book is a good quick read, maybe like a bit of a manifesto with a cookbook in the middle. It tells readers how we got here, how modern CSS can make our jobs easier and provides a bit of peek at what's coming up (hopefully) in the next year or so. The book itself has the same clear layout newer SitePoint books have used for the last few years and a long way from when they brought back bad memories of Abacus books from Amiga days. Along with clearly laid-ed out code samples and lots of browser screen-shots, the chapters are broken up with short editorials by well known web designers.
Published: 23rd January, 2009