In: Reviews > Book Reviews
Published on March 20, 2006
A couple of things stood out for me as I began to read CSS Mastery, the first book by English Web developer and user experience designer Andy Budd. In his foreword, Dan Cederholm reminds us that in CSS, “there are 3,647 ways to accomplish the same goal.” In the introduction, Budd admits that most of us working with CSS have acquired our knowledge in a very non-systematic way—borrowing code here, stealing a workaround there—and that very few of us understand the underlying specification.
What those two pieces of information did was to reassure me that this book was written for people like me. I design and maintain several Web sites but would never refer to myself as a “Web designer” or a “Web developer” and certainly not a “user experience designer.” You see, people with those titles usually know where to find answers to their arcane CSS queries, and many are active on CSS mailing lists and have crammed their RSS readers full of great CSS resources, which they read long into the evenings while drinking Red Bull. But the truth is that for many of us, this is overwhelming and intimidating.
“Wouldn’t it be great,” we say to ourselves, “if someone could put together a clearly-written book that provides a firm grasp of the basics, along with some advanced techniques when I’m ready for them. And oh yeah, it should be up-to-date and point out best practices being used by the foremost developers.” Of course, we don’t really say that. What usually comes out is more like ”#@$%* Internet Explorer!!!” But I’m happy to report that Andy Budd’s book answers a real need, even when your title is just “Web guy.”
Here are some things that Andy either explained better or taught me for the first time. Your mileage may vary:
I’d never heard of them before, and though they’re not supported in all browsers (IE6, mainly), they can be a powerful tool in the right hands. Essentially a very basic if-then command, attribute selectors allow developers to style an element based on the existence or value of a certain attribute. The example Budd gives is adding a small image next to any links which contain a
rel="nofollow" attribute. This may not be new to everyone, but it is clearly explained and definitely new to me.
This was something I heard mentioned in a CSS workshop last year at SXSW, but having it explained clearly makes all the difference. This is the ability to have a rollover in one area of the page trigger an event somewhere else on the page. The example used involves mousing over a list of links and having a box drawn around part of an image in response.
Larger monitors are allowing users much more screen real estate and sometimes our layouts look lost on these big screens. CSS allows us to build our pages to be fluid and scalable, but what about images? Up until now, images have always been the element that drags me back to fixed-dimension layouts. But Budd (and Cameron Moll, in one of the two excellent case studies at the end of the book) provide several techniques for making images a part of truly liquid page layouts.
Creating Rollovers by Positioning Background Images
I have to admit that when I first began using CSS, I stopped using images unless they were absolutely necessary. My CSS rollovers only ever used
background-color and this quickly gave my sites the additional limitation of being boring. Having this nifty technique explained carefully has given me a boost of excitement as well as a kick to the backside.
In the same vein as Dan Cederholm’s Web Standards Solutions, and classics like Eric Meyer on CSS, CSS Mastery is a worthy addition to any Web developer’s library—especially if you, like me, aren’t able to read stuff on the Web without becoming distracted and clicking on link after link until you find yourself, hours later, immersed in the history of the ampersand in the languages of central Europe. You’re tired, hungry, and you’ve missed another deadline. Luckily, if that happens (again!), I’ll be able to log off and curl up with Andy Budd’s book for a while.
Friends of Ed, 2006, 256pp.