This version of The CSS Anthology marks the book’s fourth edition. It was first published in 2004, included sections such as “How do I hide CSS from Netscape 4?”, and explained to readers how to use the box-model hack to cater for Internet Explorer 5 and 6 displays. While the second and third editions left these earlier browsers behind, the actual techniques we were using stayed relatively the same.
Ever since the first edition, I’ve strived to give examples that I’d be happy to use in my work. This is not a book of experimental or cutting-edge CSS with pages and pages of theory; rather, it’s a book of the tips, tricks, and solutions that I use every day. I’ve kept to this philosophy in the fourth edition while still introducing much that is new and interesting. The CSS3 we cover is very well supported; however, chapter 7 provides advice on how to support older browsers in your work. Just as I needed to give advice to developers supporting Netscape 4 in the first edition, I recognize now that many of you still need to deal with Internet Explorer 6 and 7. My aim is to suggest practical ways of supporting users of older browsers—saving you from dwelling on it.
In the final chapter of The CSS3 Anthology, I discuss CSS layout. While the tools that exist for layout have changed little over the last two years, the types of devices that we need to design websites for have altered massively. Our sites are now viewed on a whole range of mobile devices—from smartphones to tablets such as the iPad. Responsive design aims to tackle the challenge of designing one site that provides a great user experience, regardless of the device, and my final examples will introduce you to this important topic.
All the examples in The CSS3 Anthology come with an explanation to help you understand the solution, as well as point out any potential issues or alternate approaches. There are often several ways to solve a problem with CSS; the right solution will depend on the browsers you need to support, or certain elements in your design. By providing an understanding of why a solution works and what else you might need to consider, I hope to reveal how you can start making your own decisions when approaching any problem.
This is a really exciting time for front-end development, and it’s my hope that this book gives you the confidence to start using some of the new features of CSS3, helps you to find answers to CSS problems that you might have, and enables you to explore CSS further. I’ve really enjoyed writing this book, and I trust you’ll gain a lot from it too.
Published by and available from SitePoint