complete explanation of style sheets for web designers
This is the second edition of Eric Meyer’s best-selling guide to cascading style sheets. It covers CSS1 in impressive depth, and cautions readers quite frankly about some the problems of the still immature CSS2. Style sheets are the solution to the one big limitation of HTML. They allow authors to control the appearance of what’s on the page, leaving the HTML code to describe the content and its structure – which was its purpose in the first place.
The original guide to CSS, Cascading Style Sheets, produced by its inventors Hakon Lie and Bert Bos, is thorough and well illustrated, but it’s written in a very dry manner. Eric Meyer manages to make his account more readable, and more easily digestible for those who will need it. His ‘definitive guide’ is organised in logical sections which discuss what can be done with fonts, colour, the appearance of text, and layers – which is the introduction of a third dimension to what appears on screen.
He explains the many ways of creating colour – with a humane description of the mind-bending hexadecimal system. Then he deals with the complications of length units, the arrangement of text on the page (using spacing, justification, decoration, and alignment) and the way in which fonts and the appearance of text can be controlled.
He goes into a lot of detail on the manner in which fonts are rendered – their family, size, weight, attributes. The same is true on backgrounds. It’s a pity that O’Reilly have decided to limit the book illustrations to white, grey and black – because the topic is crying out for colour illustration.
Sometimes there are extended descriptions of what CSS tags will do, when an illustration would have been more useful, but he explains which elements are ‘deprecated’ – that is, ‘in the process of being phased out’ from the HTML Specification.
CSS also allows authors to get ready for the eventual move from HTML to extensible markup language (XML) so it’s worth learning about style sheets if the current enthusiasm for XML is going to last. There are some amazingly complex effects described which involve background images and negative positioning – pushing graphics off the screen.
You have to be prepared to embrace another set of jargon – declarations, elements, selectors, properties, pseudo-elements, values, specificity, and inheritance – but no doubt these terms will become familiar.
There are also three useful appendices – an annotated list of resources, a complete list of CSS1 and CCS2.0 properties, a sample style sheet, and a list of browser support. O’Reilly have occasionally been criticised for calling so many of their manuals ‘the definitive guide’ – but in this case there’s a good case to say the title is fully justified.
© Roy Johnson 2006
Eric A. Meyer, Cascading Style Sheets: The Definitive Guide, Sebastopol, CA: O’Reilly, third edition, 2006, pp.518, ISBN 0596527330
More on technology
More on digital media
More on web design
More on computers