BOOK AND SOFTWARE REVIEWS
McFarland, David Sawyer. CSS: the missing manual. 2nd ed. Sebastopol, CA: O'Reilly Media Inc. 2009. xvii, 538,  pp. ISBN 978-0-596-80244-8. $34.99 £26.99 €34.99
I didn't see the first edition of this book (although it was reviewed here), but, looking at the contents pages it does not appear that very much has changed. There's a new section on getting the best out of Internet Explorer 8.0, Chapter 11 has been split into two parts (Chapters 11 and 12) with some revision of the content, there's a new tutorial on creating a navigation bar, Chapter 16,CSS 3: CSS on the Edge is entirely new and there are minor changes to the Appendices.
The relatively cosmetic changes mean that if you already have a copy of the first edition, it is probably not worth 'upgrading'. However, if you are new to CSS and you are looking for a comprehensive manual that will take you through the use of style sheets for building Web pages, you probably need to look no further. The author has extensive experience of managing and designing Websites and is an established O'Reilly author.
As the author says: 'This book assumes you've already got some knowledge of HTML (and maybe some CSS experience as well).' and, certainly, I would not recommend trying to learn both HTML and CSS at the same time. Essentially, you need to know how to make a Web page with HTML before you start to use CSS, partly because you will then appreciate the power of style sheets and partly because style sheets are quite tricky things to manage, especially, for example, if you want to use them to layout Web pages without using tables.
Part 1, CSS basics consists of five chapters, dealing with the kind of HTML you need to think about when using CSS (which generally means keeping it simple), classes, pseudo classes, selectors, style inheritance and the notion of cascading. These five chapters provide the bare essential of CSS and give a grounding that is built upon in the rest of the book.
Part 2, Applied CSS moves up a notch, into formatting text, setting out margins and borders and padding text, adding graphics, using CSS for navigation features (including the new tutorial on Creating a navigation bar and formatting tables.
Part 3, CSS Page layout gets into the area that always gives me problems, including using floating elements in page layouts and positioning elements on the Web page. Both Chapters 12 and 13 have tutorials to help get to grips with the concepts. Particularly necessary, if you are going to get serious about using CSS, is the tutorial on building multiple column layouts - essentially, the alternative to using table formats. The journal's review pages now use such a layout and I cheated by using a layout designed by someone else (with acknowledgement of course!).
The final part, Advanced CSS gets into something that, perhaps, I ought to get to grips with: using CSS for the printed page. Generally, Web page designers solve the problem of how to produce a page that looks good when printed by having a separate page for that purpose - I did this some years ago for Information Research (back in Volume 5) but gave it up because there did not appear to be any great reader demand for it. CSS, however, offers a different way of dealing with problem, known as media style sheets. This involves defining a 'link' in the head of the page, which tells the system to use a particular style sheet for printing. That is (from the book):
Of course, you can call your style sheet something other than 'print.css', but that seems as good as any other!
Chapter 15 is called Improving your CSS habits and deals with those things that are often forgotten, like adding comments to indicate what a particular bit of CSS code is supposed to be achieving, or naming styles and classes clearly and some of the other finer points of Web page design.
Throughout the book there are boxes: one set, called 'Up to speed' presents information you need to understand a particular topic, for example, the chapter on using images has a box detailing the different image formats that are in use today. Another set of boxes, 'Frequently asked questions', has an obvious function and another set 'Power user's clinic' offers technical tips and shortcuts for the practised user.
All in all, this book can be thoroughly recommended for its approachable style and, in common with other O'Reilly products, its learning design. You can even get an electronic version for your e-reader.