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.


Banner

 

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.

Banner


T-SQL Fundamentals (Microsoft Press)

Author: Itzik Ben-Gan
Publisher: Microsoft Press
Pages: 608
ISBN: 978-0138102104
Print: 0138102104
Kindle: B0BTLBXF8V
Audience: T-SQL developers
Rating: 5
Reviewer: Kay Ewbank

Itzik Ben-Gan is a highly respected Microsoft Data Platform MVP, and the earlier editions of this book were already ver [ ... ]



Professional Scrum Development with Azure DevOps

Author: Richard Hundhausen
Publisher: Microsoft Press
Pages: 432
ISBN: 978-0136789239
Print: 0136789234
Kindle: B08F5HCNJ7
Audience: Developers interested in Scrum
Rating: 5
Reviewer: Kay Ewbank

This is a book designed for teams using Scrum and Azure DevOps together for developing complex product [ ... ]


More Reviews

Last Updated ( Thursday, 16 September 2010 )