Cascading Style Sheets: Designing for the Web

If I have to learn CSS from scratch, I would start with Hakon Wium Lie and Bert Bos’s Cascading Style Sheets: Designing for the Web. CSS is easy to learn, but to understand how to use it correctly is a bit challenging. In order to take full advantage of CSS, designers need to know how each element was built, and what purpose it serves. Who else can show us these things better than CSS creators themselves?

The best part about this book is not how to use CSS, but how it was created to handle certain tasks. For example, the em unit is developed to make scalable style sheets. The creators describe the thinking behind it, and prove why we should always use ems to set font sizes. Their clarification on using ems over pixels is making much more sense to me than ever before. The short background on em is interesting to read, and clearing up some confusion as well.

Even though the book does not delve into advanced techniques such as styling a menu or design a complex tableless layout, it nails the fundamental concepts to the ground. From “CSS Selectors” to “Space Inside Boxes” to “Relative and Absolute Positioning” to “Colors,” the explanations are clear and the theories behind the elements are invaluable. The authors also remind us to “know when to stop” by keeping our styles clean and simple.

Cascading Style Sheets: Designing for the Web is an important book to learn CSS the proper way. With the third edition, the book covers all the features in version 2.1, making it the definitive guide. Even though I have been using CSS heavily in my work, I still find the theories (what each element was created to do) to be intriguing. My favorite reading is the chapter on “the CSS Saga,” in which the authors give a brief history on CSS and how browsers play an important role in it. Believe it or not, Microsoft Internet Explore 3.0 was the first browser that supported CSS.

Support