Home / Books / Book Reviews / Book Review: CSS Cookbook, 2nd Edition by Christopher Schmitt

Book Review: CSS Cookbook, 2nd Edition by Christopher Schmitt

Please Share...Print this pageTweet about this on TwitterShare on Facebook0Share on Google+0Pin on Pinterest0Share on Tumblr0Share on StumbleUpon0Share on Reddit0Email this to someone

Before evaluating a review of a computer-related book, it's good to know the background or proficiency level of the person doing the review. After all, if a complete noob is looking for an instruction guide, they'd probably rather know how other noobs fared with the title instead of a seasoned professional. And vice-versa: if a veteran is looking for something that goes a few steps beyond their current level of proficiency, then it's nice to have another pro offer up their opinion.

I would consider myself a moderate or intermediate level computer user. I have a special backpack for my laptop, but I don't much care for lugging around an external mouse (if you see what I mean). I do some modest web development, am comfortable digging around code to fix problems, but don't really do any programming of my own. Recently I've had an interest in developing webpages using more stylesheet information. I hear the cool kids going on and on about this whole CSS (cascading stylesheets) nuttiness, and I don't want to be left out in the cold.

The new second edition of O'Reilly's CSS Cookbook, by Christopher Schmitt, caught my eye as an interesting title for learning some more on the topic. I had heard some good things about the previous edition, and generally find O'Reilly stuff to be well done. I'm certainly no CSS expert, but I have had occasion to dig around in it enough (through editing on other people's projects) to know I was interested in digging deeper. So that's me, and here we are.

CSS Cookbook takes a slightly different approach to presenting information than some of the other tech books you may have seen. Generally speaking, there are a couple of main categories they tend to fall under: textbook style, and project style. Textbook-style books work in a linear fashion, starting with the most fundamental elements of a topic and building upon them from there. Project-style books don't necessarily deviate from that, but they do work the information with a specific goal or problem in mind first, and then tailor the material to fit how you might learn from a real-world situation.

The cookbook approach is perhaps somewhere in the middle, although leaning more towards a textbook mentality. Information is divided up by topics (in this case, text formatting issues are together, image issues, layout issues, etc.). Within each topic, you will hit short “recipes” that seek to solve very small and particular issues. For example, setting an image for the background of the page is one recipe, and tiling a background image follows soon after. They're made to be short answers to common problems that you can look up quickly.

The plus side to this approach is that information on a particular question you have is gonna be about as easy to find as a dead-tree book can make it. The table of contents is very detailed, listing every recipe and a self-explanatory title for each. Not only that, but skipping around to just the information you need is made much more efficient than a project book could ever hope to be.

The negative aspect is that it's not a very good beginner-oriented approach; it's a good reference book for when you already know what you need to learn. In fact, it necessitates that you are going to take a “roll your own” approach to teaching yourself the topic. All the information you need is there, just not in the order or style most conducive to getting started. The beginning chapter to the book is perhaps the exception, as it lays out a good basis for what CSS is and does, and some of the basic elements that you'll need to know. But even then, elements are generally isolated unto themselves instead of building upon each other. Granted, different people learn in different ways, so perhaps this approach could be a good one for you.

Style aside, the book does a very clear job of explaining the content. Not only are generous code snippets and screen shot examples included, but there are often multiple approaches given for tackling a problem. Another nice touch is that for each recipe, they will generally tell you up front if there are particular browser inconsistencies or incompatibilities that you should be aware of. Within each recipe, information is presented and explained about as clearly and concisely as you could possibly hope for. Problems and answers are kept short and to the point, and my ADD brain loved being able to grab an answer on the go, for those times when I did have specific questions to look up in a hurry.

My main complaint with the book isn't the information or how it's presented, but rather the fact that it was just a couple of elements short of being, for me at least, a very ideal CSS companion. If I had a vote, it would be to include something more akin to two projects: one after the introductory chapter, and another as an appendix to the book. The first could use some of the information learned at the beginning, only putting everything together to incorporate CSS formatting into a basic web page.

The latter chapter could do the same, only on a more extensive all-CSS web page/site. I don't want to mess with the cookbook approach, as I think it has great merit, but from a new user perspective, the small bits of info aren't always pieced together in a way that shows the big picture. To roll with the analogy, recipes are great, but at some point you really need to put them all together into a five-course meal.

In the end, I would highly recommend this book for someone who already has a basic understanding of CSS. The succinct approach of the cookbook style can't be beat for reference and problem-solving. If you are an absolute beginner, however, you might benefit more from either a basic web development book that also includes some basic information on CSS, and then moving up to this one; or perhaps a more project-styled book.

Powered by

About David R Perry