Top positive review
After reading this, my days of tinkering with CSS and constantly Googling are at an end.
on 8 July 2010
In my own personal journey of become a developer, I've always felt CSS has been my achilles heel from going after Web Developer roles. I'd always been more comfortable server-side and using Java or Groovy.
I've know the basics, things like CSS selectors, am a whiz with DOM manipulation and using Ajax libraries, but every time I tried to achieve something outside the comfort of YUI or Dojo, rolling my own CSS had been a frustrating and arduous process of trial and error and time spent Googling trawling through results that invariably didn't work.
I'd find I'd be copying and pasting examples without really understanding why things sometimes worked with certain HTML elements and then didn't with others.
Yes I was aware of the basics of inline vs block components, but Michael opened my eyes to the fact that there are more granular classifications of elements and consequently why certain attributes weren't capable of being styled across the board because these classifications.
The book is comprised of 20 chapters.
Chapter 1 distills a lot of information down into a superb and handy reference.
Chapters 2-20 are a series of patterns that build on each other and are cross-referenced.
For me I think Chapter 17 was the high point of the book when the author discussed various layouts (including Fluid) and the final example in this chapter ties everything together.
The layout of the book essentially follows a screenshot, following by the HTML & CSS code on the left page. On the facing page, the problem & solution is described.
It is a bit tough going around pages 100-200, but my advice is to concentrate on the Pattern, visual screenshot and the HTML/CSS and the Example section when present when the author discusses the solution in more depth for the meatier problems.
Knowing how to combine the CSS elements that form the pattern (or building blocks) you'll be set to tackle rolling your own code.
In addition to this, there is also sage advice on search engine optimisation, performance related issues, semantic markup and accessibility issues scattered throughout the book.
There are various routes people take when coding web pages for multiple browsers, hacks, coding to standards, graceful degradation, progressive enhancements. Thankfully you'll find no hacks in here. As the author indicates, hacks are prone to stop working once a browser fixes the issues.
If doesn't just follow the standards are the only way to go route, and what the heck if some poor sucker is still using IE6, then tough luck. Instead the book shows patterns that work in all the browsers including (yuck IE6).
At the time the book was written it concentrated on IE6/IE7/Safari2/Firefox 2. Things have moved on a bit since then. But for the better, Wiki has a good comparison of the capabilities and adherence of browsers to standards.
If there are issues with browsers, the author describes why he takes certain approaches to cover all the bases.. He discusses the merits and limitations of solutions and above all else the patterns which show how to combine a staggering number of permutations of CSS rules to achieve a given goal. (350+ patterns according to back cover).
I guess my only gripes with the book were:
* the rounded corners example. I couldn't understand why there was a need for three graphics and I got lost in the figure 14-7 on P312. I couldn't understand why the square with the rounded corners couldn't be placed in each corner.
* the use of cssQuery over the likes of jQuery for some of the dynamic design patterns. This book was published in 2007, and I've seen references to jQuery from that timeframe.. jQuery is faster than cssQuery enabling CSS selector DOM manipulation too. Is cssQuery even being maintained any more?
* P208 & 292 Text Replacement/Replaced Text were one and the same pattern. I sort of get the reason for this, because one was in a chapter on images, the other was on text. But even so... Why repeat, just cross reference.
Overall this does not detract from what is a quality must have book for any web developer. The best I've seen on CSS (and I've got around 8 to 10 books on the subject). Once you know the basics, clear the shelves and replace it with this one. You won't be sorry you made the purchase.
If you want to have a sneak peak at the code and examples in action too, try Googling on cssdesignpatterns