Chapter 4
Template Editing
To edit a template, openthe Assets panel, clickthe template, and thenclick the Edit buttonat the bottom of theAssets panel. After youupdate the template,Dreamweaver askswhether you want to makethe same changes to thedocuments that are basedon the template.
Detaching a Page froma Template
To detach a page froma template, click Modifyon the Application bar,point to Templates,and then click Detachfrom Template on theTemplates submenu. Thepage becomes a regulardocument, and the lockedregions become editable.
Editable Regions inTables
You can place editableregions anywhere ona page, including anindividual cell or anentire table. You cannot,however, select severalnonadjacent cells and define them as oneeditable region.
Saving an HTML File asa Template
If you have an HTML file that you want to save as a Dreamweaver template, open the document, click File on the Application bar, and then click Save As Template. You also can click the Templates button on the Common tab in the Insert panel, and then click Make Template.
Types of Styles
Besides defining class, tag, and advanced styles, you can define a style for an ID, which is any tag that contains a specific ID, such as a named div tag. You also can define a compound rule, which affects two or more classes, tags, or IDs, such as Heading 1 text in a named section of the page. Class, ID, Tag, and Compound are the four selectors types provided in the New CSS Rule dialog box.
External Style Sheets
External style sheets are separate files and are independent of any HTML pages within the Web site. Any Web page in a Web site can access a common set of properties by linking to the same
Browsers and Style Sheets
In some cases, Internet Explorer and Firefox interpret some style sheet commands differently. Be sure to view your Web pages in these two browsers and as many other browsers as possible.
Creating CSS Rules in the Property Inspector
Another way to create CSS style rules is to use the CSS Property inspector. Select text to which you want to apply a new CSS rule. Click the CSS button in the Property inspector, if necessary, to display the CSS Property inspector, and then click the Edit Rule button to open the New CSS Rule dialog box, which you use to specify the style attributes in the new rule.
Using the Page Properties Dialog Box
You can use the Page Properties dialog box to set CSS rules for properties in the Appearance, Links, and Headings categories. These rules are included in the <head> section of the page, which you can display in Code view.
Updating Documents Based on Templates
When you change a template, Dreamweaver reminds you to update the documents based on that template. If you want to update documents at any other time, open the document, click Modify on the Application bar, point to Templates, and then click Update Current Page to update only the open page or click Update Pages to update all the pages based on the template.
Favorites List in the Assets Panel
If you frequently use certain images, templates, or other assets such as URLs, display those assets on your Favorites List in the Assets panel. To do so, select one or more assets in the Site list, and then click the Add To Favorites button.