CSS Detective Guide

Author: Denise R. Jacobs
Publisher: New Riders, 2010
Pages: 288
ISBN: 978-0321683946
Aimed at: Anyone who hand crafts or debugs CSS
Rating: 4.5
Pros: Logical approach
Cons: Style might irritate some readers
Reviewed by: David Conrad


Do you tackle CSS bugs as if you were a detective? This book explains that this is the right way to do it.

This is a book on solving CSS problems. It may seem strange that a book would focus on CSS, which doesn't  rank up there with HTML or Javascript, but the truth of the situation is that today most of our web page layout is controlled by CSS. In an ideal world all of the layout would be controlled by CSS and the HTML would be relegated to marking out the meaningful parts of the page - more in the style of "this is a menu" and the CSS will determine what it looks like.

What this means is that when the layout of a web page goes wrong it is likely to be the CSS  - hence this book.



It has the subtitle "Tricks for solving tough CSS mysteries" but the author does much more than provide tricks. The basic idea is that you tackle a CSS problem much like a CSI or a detective would deal with solving a crime. Hence the book is replete with lots of detective-y references. These are mostly ok, and even raise a smile now and again, but I can imagine that it might irritate some readers.

Similarly all of the common bugs are given names like "Peekaboo bug", "Guillotine bug" and so on. If you think these names are silly, then make up your own names, but giving things a descriptive name is a great idea. Programmers do it all the time but in this case they are abstracted and made to seem difficult by being called "patterns" and "anti-patterns" - so much better to call something the "peekaboo bug" and make it sound approachable than to call it the "float semantic nesting seriation bug"....

The book opens with a good explanation of CSS and HTML - not for the beginner but for the reader who think they know how things work. After reading the first four chapters you should have a much better understanding of CSS and the HTML it formats and be ready to follow how things go wrong and how to fix them.

The second part of the book "The Game's Afoot", a Sherlock Holmes quote, presents six case studies each in the form of a crime to solve - the case of the devilish details, the case of the mistaken identity, the case of the single white space, the case of the float, the case of the browser, and the case of the LOL layout.  All great stuff, clever and logical with lots of explanations of how the solutions are found and the thinking that reveals the culprit. Again you need to have a tolerance for a detective format and lots of very long listings - perhaps too long. It is at this point you start to think that CSS was never really intended for human consumption and getting a good automatic tool on the job might be a better idea than hand crafting CSS/HTML.

Similarly a lot can be found out using the developer tools built into say Firefox and IE. For example, if you have a layout problem IE will show you the inheritance tree for any element and it will even allow you to modify properties interactively and instantly show you the result. Trying to solve CSS problems without the help of this sort of tool really is like giving up the mass spectrometer and DNA profiling and using nothing but Sherlock's magnifying glass and logic. 

As long as people hand craft CSS in this way there will be CSS crimes to solve and even with the best tools in the world the sort of logical approach described in this book is going to be invaluable in finding the problem and in fixing it correctly.

This isn't a book that will appeal to every reader - you need to first know a reasonable amount about CSS and you need to be prepared to learn a lot more - but if you want to master the subject this is a very good and fun way to learn.

Highly recommended.


Query Store for SQL Server 2019 (Apress)

Author: Tracy Boggiano & Grant Fritchey
Publisher: Apress
Pages: 234
ISBN: 978-1484250037
Print: 1484250036
Kindle: B07YNL3X4X
Audience: SQL Server DBAs and Devs
Rating: 4
Reviewer: Ian Stirk

This book aims to use Query Store to improve your SQL Server queries, how does it fare?

Teach Yourself Java in 21 Days, 8th Ed (Sams)

Author:  Rogers Cadenhead
Publisher: Sams
Pages: 672
ISBN:  978-0672337956
Print: 0672337959
Audience: Beginning Java Programmers
Rating: 4
Reviewer: Mike James
Java! Its still more than relevant and at edition 8 this must be a classic?

More Reviews

Last Updated ( Thursday, 16 September 2010 )