You are previewing CSS3 Foundations.

CSS3 Foundations

Cover of CSS3 Foundations by Ian Lunn Published by John Wiley & Sons

chapter five

Adding Presentational Styles

In this chapter, you take a deeper look at some of the properties you’ve already used, learn how to use shorthand properties and property values, and learn many more properties to make Cool Shoes & Socks really stand out!

Before you begin reading about presentational styles, first set up the page to give it a little more structure:


Project Files Update (ch05-00): If you haven’t followed the previous instructions and are comfortable working from here onward or would like to reference the project files up to this point, you can download them from

1. In styles.css, find the body rule set and add the following declarations:

margin: 0 auto;

max-width: 960px;

2. Save styles.css.

These properties—that center the web page as shown in Figure 5-1—are covered in Chapters 6–9. It’s kind of looking more like a web page now, right?

The best content for your career. Discover unlimited learning on demand for around $1/day.