ONLINEPROOFINGSERVICE.COM

affordable web hosting - www.onlineproofingservice.com

Menu


External style sheets linked to the current document appear in the CSS Styles panel. Figure 8-20: Attach


an external style sheet with this dialog box. Chapter 8: Cascading Style Sheets 231 4. To apply a style on your page, select the text to which you want to apply the style and apply the style in the same way you would with an internal style sheet. For more on applying styles, see the section "Applying styles in Dreamweaver," earlier in this chapter. Editing an external style sheet You edit linked external style sheets exactly the same way as you edit internal style sheets using the CSS panel, which lists all styles in the document, whether theyre internal or external. Use the Properties pane of the CSS panel to directly edit the rules for each style. Any changes you make to the external style sheet are automatically made, even though its a separate document (as long as the style sheet exists locally on the computer). If you try to edit a remote CSS file from a linked page in Dreamweaver, you cant because Dreamweaver doesnt have edit privileges for the file. If you want to edit a remote CSS file, you have to download the file to your hard drive before you can open it in Dreamweaver. In Dreamweaver, you can open .css files by either double-clicking them or choosing File?Open, both of which open the style sheet in Code view. Code view is the only view available for CSS files because theyre text files and have no layout components. When you view an external style sheet this way, you can still use the CSS panel to edit the style sheet, even if the style sheet isnt linked to an HTML page. Be sure to save it when you finish editing it! Of course, if you prefer, you can also edit the code by hand directly in Code view. Figure 8-22 shows an example of a style sheet opened directly in Dreamweaver. Notice that the CSS panel displays all relevant style information and gives you access to the CSS editing tools. When you finish editing an external style sheet, you need to upload it to your server before the styles apply to pages on your live Web site. Applying ready-made external style sheets Macromedia includes a bunch of sample style sheets for you to use to create new pages in your Web site. These come in the form of external styles sheets that have been created with some popular styles in mind to help you get better acquainted with style sheets and give you a jump-start in designing with them. You can either use these styles as is or modify them to suit your needs. 232 Part III: Advancing Your Site To access the sample style sheets provided by Macromedia, follow these steps: 1. File?New. The New Document dialog box opens (see Figure 8-23). 2. Select CSS Style Sheets from the Category list to display the list of CSS files, and try clicking any of the sample styles that are listed. Notice that a preview of how the style appears displays on the right side of the dialog box when you click any of the sample styles.