• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 14. Building Style Sheets and Dy... > Creating and Editing Embedded Style ...

Creating and Editing Embedded Style Sheets

An embedded style sheet can only be used for the single page in which it was created. To apply styles across multiple pages or an entire Web site, see To create an external style sheet. By the way, just in case you come across the term, embedded style sheets are sometimes called internal style sheets.

To create an embedded style sheet

1.
Make sure you’re in page view and choose Format > Style or click the Style toolbar if it is active (Figure 14.5).

Figure 14.5. To reach the Style dialog box, choose Format > Style (left) or click the Style toolbar (right).


2.
When the Style dialog box appears (Figure 14.6), click New.

Figure 14.6. To create a new style, click New in the Style dialog box.


3.
When the New Style dialog box appears, type a distinctive name into the Name (selector) text box and click Format (Figure 14.7).

Figure 14.7. When the New Style dialog box appears, type a distinctive name into the Name (selector) text box and pick one of the Format drop-down menu items—Font, Paragraph, Border, Numbering, or Position.


4.
Pick one of the Format drop-down menu items—Font, Paragraph, Border, Numbering, or Position—and use the dialog box that appears to choose properties for your new style. Once you’ve made one set of choices for, say, Font, you can use the Format drop-down menu to add Border properties.

5.
Once you’re done, inspect the results in the Preview area, and click OK (Figure 14.8). The new style—and any other HTML styles that you change—will be listed as a User-defined style in the Style dialog box (Figure 14.9).

Figure 14.8. Once you’ve defined your new style, inspect it in the Preview area, and then click OK.


Figure 14.9. A new or modified style will be listed as a User-defined style in the Style dialog box.


6.
If you want to create another new style, click New again and repeat steps 3–5. When you’re done creating styles, click OK in the Style dialog box. If you want to see the CSS coding, select the affected page element in Normal view, then click the HTML tab (Figure 14.10).

Figure 14.10. To see the CSS coding, select the edited page element in Normal view, then click the HTML tab.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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