The Book of CSS3

The Book of CSS3
A Developer's Guide to the Future of Web Design
Peter Gasston
May 2011, 304 pp.

CSS3 is the technology behind most of the eye-catching visuals on the Web today, but the official documentation can be dry and hard to follow and browser implementations are scattershot at best.

The Book of CSS3 distills the dense technical language of the CSS3 specification into plain English and shows you what CSS3 can do right now, in all major browsers. With real-world examples and a focus on the principles of good design, it extends your CSS skills, helping you transform ordinary markup into stunning, richly-styled web pages.

You'll master the latest cutting-edge CSS3 features and learn how to:

  • Stylize text with fully customizable outlines, drop shadows, and other effects
  • Create, position, and resize background images on the fly
  • Spice up static web pages with event-driven transitions and animations
  • Apply 2D and 3D transformations to text and images
  • Use linear and radial gradients to create smooth color transitions
  • Tailor a website's appearance to smartphones and other devices

A companion website includes up-to-date browser compatibility charts and live CSS3 examples for you to explore.

The Web can be an ugly place—add a little style to it with The Book of CSS3.

Author Bio 

Peter Gasston has been a web developer for over 10 years in both agency and corporate settings. He was one of the original contributors to, the leading online destination for CSS3. Peter has been published in the UK's .net magazine, gives talks about CSS and web technologies at developer conferences, and runs the web development blog Broken Links. He lives in London, England.

Table of contents 


Chapter 1: An Overview of CSS3
Chapter 2: Media Queries
Chapter 3: DOM and Attribute selectors
Chapter 4: Pseudo Classes and Pseudo Elements
Chapter 5: Web Fonts
Chapter 6: Text Effects and Typographic Styles
Chapter 7: Multiple Columns
Chapter 8: Background Images and Other Decorative Properties
Chapter 9: Border and Box Effects
Chapter 10: Color and Opacity
Chapter 11: Gradients
Chapter 12: 2D Transformations
Chapter 13: Transitions and Animations
Chapter 14: 3D Transformations
Chapter 15: Flexible Box Layout
Chapter 16: Template Layout
Chapter 17: The Future of CSS

Appendix A: Browser Support
Appendix B: Online Resources

View the detailed Table of Contents (PDF)

View the Index (PDF)


"The Book of CSS3 is one of the best technology books I've read. I'd recommend it to any web developer who's itching to experiment with the new techniques."
—Craig Buckler, Optimalworks Ltd (Read More)

"This book is an absolutely fantastic resource for developers and serious designers and I would recommend a full read of the content."
—Visual Swirl Design Resources (Read More)

"I can honestly say I will never need another book on this subject, and I doubt anyone else will either. The Book of CSS3 covers it all and covers it well."
—Devon Young, Writer for (Read More)

"I use a lot of CSS3 to control backgrounds and box elements, but there are entire sections of the CSS3 spec that I never really appreciated until I read this book."
—Designorati (Read More)

The Book of CSS3 "is a book you more than likely should have, even if you think you already have a pretty good handle on everything CSS."
—456 Berea Street (Read More)

The Book of CSS3 "is a superb resource that explains what important CSS3 modules do, gives specific and clear examples of how to implement those modules, and provides insight into how browsers support those modules."
—Ecommerce Developer (Read More)

"Gasston's writing style is informative and even witty at times but cuts straight to the point instead of being overly verbose. He does a great job of explaining each property quickly and getting to what you really want to see: the syntax."
—Design Shack (Read More)

"The first chapter is a must read. It's a fascinating look at the history of CSS3."
—.NET Developer's Journal (Read More)

"For a small book (relatively speaking) it packs a big punch (figuratively speaking) and can teach a lot of a challenging topic in an easy to understand way (literally speaking)."
—Michael Larsen, TESTHEAD (Read More)

"If you're a web developer who... wants to learn about the new CSS3 features in a fast, easy way, this book will certainly help you achieve that goal."
—Mike Riley, Dr. Dobb's Journal (Read More)

"An excellent introduction to CSS3—both what you can do with it now and what is proposed for the future."
—Stephen Chapman, (Read More)

"If you want to be brought up to speed with CSS3's new feature set, you should read this book."
—Durham University Computing Society (Read More

"If you're in the market for a good old fashioned book to delve into the latest version of CSS, I'd definitely recommend checking out Gasston's book."
—The Pixel Boutique (Read More)

"If you're looking to learn more about CSS3, this is definitely a book to look into."
—Patrick Gillespie, (Read More)

"This book is a great guide to updating your CSS knowledge, ensuring you are not left behind."
—Adam Kinney, Designer and Developer (Read More)

"A thorough examination of the present and potential uses of CSS 3."
—Webuquerque (Read More)

"If you're looking to put CSS to use in your websites, this is the book to pick up."
— (Read More)

The Book of CSS3 "helped me discover things I had no idea I didn't know about CSS."
—Brian R. Bondy (Read More)

"If you're involved in designing websites and want to understand the direction in which CSS is moving, Peter Gasston's book is an excellent place to start."
—Foundation PHP (Read More)

"I'm incredibly impressed with the The Book of CSS3, from the enviable, concise style of writing to the sheer thoroughness of the topics covered, and the clear, consistently presented examples."
—Richard Carter, (Read More)

Extra Stuff 

Peter Gasston discusses the future of web layout:


Page 20:
The paragraph that reads, "This syntax tests that both expressions are matched before applying the selected rules. For example, to make sure all permutations of widescreen are covered, as mentioned in the previous section, you would create this query:" should read "This syntax tests that both expressions are matched before applying the selected rules. For example, to test for a small screen in 16:9 widescreen format you could create this query:"

And the code should read:

"@media only screen and (aspect-ratio: 16/9) and (max-device-width: 800px) { rules }"

Pages 57-58:
The empty local('') functions in the code for example 5-4 should contain a unicode smiley face as shown in the Final "Bulletproof" Syntax code on Page 56"