My latest book, Getting StartED with CSS, has been published, and is already in stock at Amazon.com. “Who needs yet another book on CSS?” you may ask. The reason I wrote it is because I felt the process of learning CSS was made too hard by the books that I used to learn it. Let’s face it. Learning CSS can be an uphill struggle. It’s not because the basic syntax is difficult. In fact, it’s quite easy. The main problem lies in the infinite number of ways you can combine properties and selectors to achieve the effect you want. Another big problem has been the inconsistency in the way browsers have rendered CSS.
This second problem is finally becoming less acute, thanks to the release of Internet Explorer 8 in March this year. IE8 supports the whole of CSS2.1, and its accurate rendering of CSS puts it on a level with other standards-compliant browsers, such as Firefox, Safari, and Opera. Getting StartED with CSS was written after the release of IE8, so it’s bang up to date; and it concentrates on CSS as rendered by modern browsers, rather than getting bogged down in details of hacks to persuade older browsers to behave. However, since the bane of web designers’ lives, IE6, is likely to be around for some time to come, the book does offer advice on how to deal with the most common bugs in IE6.
Where I hope my book stands out from others is in the way it avoids throwing a whole load of theory at your before you can achieve anything practical with CSS. Instead of forcing you to wade through a detailed explanation of classes and other selectors before you start using CSS, I show you how to achieve practical results with the most basic selector of all, the type (or tag) selector, which redefines the default look of HTML tags. I don’t get into classes until Chapter 4 (of 12).
Another difference is the way I approach the box model, an understanding of which is essential to working with CSS. Instead of bamboozling you with a whole pile of theory, I devote a whole chapter to showing how margins are used to create space between elements and lay them out. The following chapter builds on this by discussing how to add backgrounds and borders. Finally, a third chapter brings the whole box model together by adding padding, width, and height into the mix. My aim is that by introducing each aspect of the box model gradually, you build up a better understanding of how it all fits together. By the of the twelfth chapter, you have studied all visual and print properties in CSS2.1, including some of the less well-known ones, such as generated content.
Perhaps my only disappointment with the book is that it’s printed in black and white. However, the plus side is that the publisher has given it a relatively inexpensive price tag, at least for a computer book. The cover price is $24.99, and many online sellers are offering it for a discount. Sadly, the price is more expensive outside the USA, but that always seems to be the case with books.
The book’s companion website contains a complete reference to all CSS2.1 visual and print properties, and selectors, together with lots of examples of the properties in action. I hope you’ll find the site useful even if you don’t buy the book. But, of course, I hope you will decide to buy.