Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Duplicating a style

Now you'll create a new class for the author's attribution by copying the selector that you just created.

1.
In the Spotlight.html Style Sheet 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.

2.
Click the Duplicate button () on the Style Sheet toolbar to duplicate the class selector. A new item called .pullquote1 appears in both the Style Sheet window under the Internal folder and in the Basics tab of the CSS Selector Inspector.


Duplicated class



Duplicate class properties


Now you'll edit the properties of this duplicate class.

3.
In the Basics tab of the CSS Selector Inspector, rename the class .author.class, and press Enter or Return.

4.
Click the Font tab () in the CSS Selector Inspector. Notice that the attributes for the .pullquote class already appear. Change the font color to Black and the font style to Normal.

5.
Click the Block tab of the CSS Selector 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.

6.
In your document window, select the text "Benjamin Lucas" immediately below the pullquote.

7.
In the Style tab in the Text Inspector, next to the author selector, click the Par column. This updates your page with this new format.

8.
Make the Spotlight.html document window active, and choose File > Save to save your changes.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint