
Designing with Cascading Style Sheets Tutorial 45
6 Set the following Type attributes for the link:
In Decoration, select Overline.
In Color, in the text box, enter #FFCC99.
7 Click OK.
8 To see the style you applied to the links you must view the page in a browser, press F12 to
preview your page.
Export styles to create an external style sheet
The CSS styles you’ve created so far have only applied to this document. Internal style sheets
apply only to the document in which they were created. Now, you’ll learn how to create an
external style sheet which contains the styles you defined in this document.
1 Choose File > Export > Export CSS Styles.
In the Export CSS Styles dialog box appears.
2 In the dialog box, in the Save In (Windows) or Where (Macintosh) pop-up menu, navigate to
your local site folder.
3 In File Name (Windows) or Save As (Macintosh), name the file mystyle.css.
Note: You can name a CSS style sheet any name you want, with the following exceptions; the name must be
lowercase and contain no spaces.
4 Click Save.
Attach an external style sheet
You’ll attach the CSS style sheet you just created to another document in your site. The document
you’ll work with is the same as the original css_start.htm file, before you added style to it.
1 In Dreamweaver, open the Site panel (Window > Site), if it isn’t already open.
2 In the Site panel, locate the file named css_start2.htm, then double-click it to open it in the
Document window.
3 In the CSS Styles panel, click the Attach Style Sheet button located at the bottom of the panel.
The Link External Style Sheet dialog box appears.
4 In the File/URL text box, enter the path to mystyle.css or click Browse and in the dialog box
that appears navigate to the mystyle.css file, then click OK to select it.
5 In the Link External Style Sheet dialog box, for Add As, select Link.
6 Click OK.
The selected style sheet links to the current document, and the style attributes are
immediately applied.
Commenti su questo manuale