Don’t let the title of Andy Budd’s recently released book, CSS Mastery: Advanced Web Standards Solutions, fool you. Yes, it is filled with advanced CSS information; but it isn’t just for the advanced programmers. I bought this book with the hope of learning some of Andy Budd’s positioning, descendent selectors, and cross-browser techniques. I didn’t expect to learn some of the basic elements of CSS.
Easy to read and use
Andy’s writing style is easy on the eyes. He knows when to skip remedial information and when to point out the important tidbits that save an hour or so. For example, Budd describes the behavior of collapsing margins with a clarity that other books have lacked.
…It may seem strange at first, but margins can even collapse on themselves. Say you have an empty element with a margin, but no border or padding. In this situation, the top margin is touching the bottom margin and they collapse together…
This is why a series of empty paragraph elements take up very little space, as all their margins collapse together to form a single small margin.
…Margin collapsing only happens with the vertical margins of block boxes in the normal flow of the document. Margins between inline boxes, floated, or absolutely positioned boxes never collapse.
CSS Mastery – Advanced Web Standards Solutions pgs 32,33
I’ve already placed a few flags in the book and they’ll multiply as I return for more techniques. Was this book worth purchasing? I found a number of techniques from Andy’s personal toolkit that made the book worth 10 double espresso mocha frappathingies. Here’s a tip that was particularly timely for me. Andy discusses the use of links with spans to create disjointed rollovers. I’m having an issue in IE6 right now with the span not being entirely clickable.
…Unfortunately this example doesn’t quite work in IE on Windows. It would seem that IE/Win has problems targeting nested elements inside an anchor link, using the :hover dynamic pseudo-class. However, there is a simple, if somewhat odd, workaround. Adding the following rule on this anchor’s hover state seems to fix the confusion in IE and allow it to honor nested hover state rules:
#pic a:hover {border:none;}
CSS Mastery – Advanced Web Standards Solutions, pg. 107
That is the kind of gem that only comes from experience.
Who should buy this book?
This book falls into the category of CSS/HTML theory from beginning to end. It starts with the basic platform of semantic coding and moves on towards the final use of advanced techniques. It is a nice replacement for Eric Meyers on CSS and More Eric Meyers on CSS, both of which give basic techniques and information but lack the style of Budd’s designer eye. This book reminds me more of The Zen of CSS Design : Visual Enlightenment for the Web by Dave Shea and Molly Holzchlag. CSS Mastery and Zen of CSS are written from the developer/designer’s viewpoint. Both contain tips and techniques. While Zen touches lightly on the coding, Budd takes you full circle, from theory to final production.
Leave a Reply