Reviewed January 9th, 2007 @ 10:16PM
Pro CSS Techniques by Jeff Croft, Dan Rubin, and Ian Lloyd is a very thorough book on practical CSS. Having just read Simon Collison’s Beginning CSS Web Development I found this to be a great continuation of the learning process. This book picks up where Simon’s book ended, and even briefly covers some of the same topics. This book is full of great information and each author had a fun personality (and sense of humor) with their chapters.
The book jumps right in and walks you through specificity and the cascade and how this will help you keep your markup neat and tidy (without any superfluous markup). This topic can cause confusion for many beginning CSS and even those who are advanced. Having a strong understanding of the cascade and specificity will greatly help you write cleaner code and solve any debugging issues that may arise. This chapter was full of examples, charts, and interactive walkthroughs to help you understand the process.
The next few chapters were spent discussing the browsers, managing your CSS files, and many of the hacks used to fix problems. These were similar to some of what was seen in Beginning CSS Web Development — but they require special emphasis. I didn’t feel that any of the authors ever advocated using hacks to solve problems. They challenged you as a developer to dig deeper and find workarounds that didn’t require hacks. However, when it is necessary — they explain the process of using conditional comments versus mixing any hacks into their own sheet or section of your other files.
Chapter 7 was by far my favorite chapter of the entire book. I have read many other CSS books that show you advanced layouts and techniques, even full of the code and images, but don’t fully prepare you for the frustration that may arise. This chapter walked you through creating different layouts. Absolute positioning, floats, liquid layouts, fixed with layouts, and elastic layouts were all discussed. The best part about the chapter is that the author walks you through your failures. In seeing these failures and being aware of them, it will ultimately help you avoid them in the future (or at least be prepared when something goes awry). Failure is a part of learning CSS, and the author comforts (and humors) the reader as he shows the failures, explains why and what failed, and how to fix and continue with the layout. In the end you are working towards a very simple, yet flexible, layout.
Another topic that is not often discussed is that of typography. This chapter was an exhaustive covering of typography and the web. It included information about upcoming typefaces available in vista, as well as some current typefaces that you might not know about. It also covered things like leading (line height), kerning (letter spacing), and how to make sure your liquid layouts (or high contrast layouts) don’t ruin the legibility.
The last few chapters walk you through styling everyday elements like tables, forms, and lists. The last two chapters were focused on stylesheets for other media (print, screen, projection, etc). I found this chapter very interesting as we are moving toward supporting mobile devices. I think initially it would be easy to think you can serve up the ‘handheld’ stylesheet and all is well — however we are finding that this is not true (Which is why I can’t wait for Cameron Moll’s book on Mobile Web Design). With so many different devices and services out there, what will be the best way to target them? I used to think the handheld stylesheet would solve many problems — but I am re-thinking that as a solution.
Finally, the book wraps up with an exhaustive list of CSS References including: allowed values, element type, and initial/inherited values. Also covered is the CSS specificity chart and the browser grading chart. The appendix of this book makes a nice desk reference to help solve an issue.
Overall I really enjoyed this book. If you are still dipping your feet into CSS, then this book will help you understand the inner workings of CSS and help you avoid many frustrating hours of debugging. Yes, there were some advanced topics that weren't discussed that could have been (
hasLayout), but overall the book covered everything exhaustively. Do yourself a favor and pick up a copy of this book.