As discussed in Lesson 2, "Using CSS Rules," shorthand properties are easier to write and maintain than longhand properties. They also make CSS files more concise. The <p> element can be styled so that font-size, line-height, and font-family are declared as a single font property. The introduction class can be styled so that font-style, font-weight, font-size, line-height, and font-family are declared as a single font property as shown in Listing 7.6. Listing 7.6. CSS Code Containing the Shorthand Stylesp { font: 80%/1.4 arial, helvetica, sans-serif; } p.introduction { font: bold italic 110%/1.4 times, "times new roman", serif; text-align: center; color: #900; } |