Share this Page URL

Lesson 12. Using Cascading Style Sheets > Changing the background color - Pg. 336

Using Cascading Style Sheets 1. 336 2. In the spotlight.html CSS Editor window, select the .pullquote class that you created earlier. It's now part of the document's internal style sheet. You'll duplicate this class and then modify its font to create a new class. With the .pullquote class selected, right-click (Windows) or Control-click (Mac OS) to display the context menu, and choose Duplicate. (You can also choose Edit > Duplicate from the Go- Live command bar.) A new item called .pullquote1 appears in both the CSS Editor window under the Internal folder and in the Basic panel ( ) of the CSS Style Inspector. Now you'll edit the properties of this duplicate class. In the Basic panel of the CSS Style Inspector, rename the class .author, and press Enter or Return. (Don't forget the leading period in the class name.) Click the Font button ( ) in the CSS Style Inspector. Notice that the attributes for the .pullquote class already appear. Change the font color to Black and the font style to Normal. Click the Block button of the CSS Style Inspector, and enter a top margin of ­1% to close up the space between it and the pullquote. Then press Enter or Return. Now you'll apply this new class style to your page. In your document window, select the text "Benjamin Lucas" immediately below the pullquote (poem). In the CSS palette, next to author, click the Par column. This updates your text with this new format. Make the spotlight.html document window active, and choose File > Save to save your changes. 3. 4. 5. 6. 7. 8. Changing the background color