Weblogs: Book Reviews

Cascading Style Sheets: Separating Content from Presentation

Monday, June 23, 2003

Author: Owen Briggs, Steven Champeon, Eric Costello, and Mark Patterson
Publisher: Glasshaus
Publish Date: May 2002

Cascading Style Sheets: Separating Content from Presentation Although CSS has been available as a technical recommendation for over four years it hasn't caught on in the web design community. The main reason behind this is the poor support and implementation in browsers. This disadvantage has largely been solved, thanks to a stream of almost-compliant browser starting with Internet Explorer 5 on the Macintosh and progressing right through to the recent Mozilla, and Opera 7. Now over 90% of the browsing population are using a browser with good support for CSS. The problem is the learning curve to mastering CSS, which is where this book fills the gap nicely.

The theory of structure and presentation

The first part of the book provides an overview of CSS. Chapter one detailing the history of HTML and CSS, the sidetrack and damage caused by the browser wars, the back to first principles and almost the re-introduction of stylesheets as a way of suggesting a presentation for an HTML page. It covers some of the technical advantages of using a separating styles from the content.

Chapter two covers a discussion of presentation, how to identify the difference between presentation and structure (and offering techniques such as greeking). It introduces an overview of how styles are stored or referenced by an HTML page. Chapter three looks at structured markup, how it adds value, and how to analyse documents to find its underlying structure.

The theory of web design and style

Section 2 focuses on presentation and style from a practical standpoint. Chapter 4 introduces the concepts of block and inline elements as well as the inheritance and cascading of styles. It also provides an excellently written explanation of the CSS box-model - typically the source of much confusion. Chapter 5 describes CSS rules, how to identify and style structural elements, covering a good range of selectors and pseudo-classes. Chapter 6 is a short chapter explaining how to reference styles or stylesheets from HTML pages, preferring the external style-sheet.

Chapter 7 is a gem of a chapter, covering the art and style of typography. I found this chapter immensely useful and instructive. The author explains the value of typography and how it is used to guide the reader, offering tips and suggestions for improving the readability of text.

Chapter 8 is a must for all new CSS users, it covers using boxes to generate a layout. It covers the practice of floating elements in a document flow as well as absolute positioning.

Real world CSS

The third section covers practical CSS usage - typically working around browser bugs. Chapter 9 covers the need to hide styles from certain browsers (most notably Netscape 4), as well as documenting a number of known browser-bugs as well as ways to work around common problems. The range of browsers examined isn't exhaustive, but realistic: Internet Explorer on Windows and the Mac, Netscape 4, Mozilla, Opera 5 and 6.

Chapter 10 involves discussing techniques for trouble-shooting badly behaving style sheets, trying to determing which browser and which bug is the cause of a problem. It offers advice, suggestions and tools.

The book concludes with a short chapter implementing three typical website layouts. This rounds off the book fairly well, and serves as an excellent summary of its content.

Conclusion

Overall, this book is a decent guide to using stylesheets for website presentation and layout. For me the chapter on typography as well as the browser-workarounds are excellent references and guides. Its a shame that both Eric Meyer and Jeffery Zeldman have simiar books available, and this is probably why "Cascading Style Sheets: Separating Content from Presentation" may be overlooked and underrated. Although glasshaus is no longer, hopefully this title will re-emerge under a different publishing house.


[ Weblog | Categories and feeds | 2011 | 2010 | 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 ]