Adobe 000_UsingDreamweaver Dreamweaver Instruction Manual En
User Manual: adobe Dreamweaver - Instruction Manual Free User Guide for Adobe Dreamweaver Software, Manual
Open the PDF directly: View PDF .
Page Count: 582
Download | |
Open PDF In Browser | View PDF |
Using Dreamweaver ™ macromedia ® Trademarks Afterburner, AppletAce, Attain, Attain Enterprise Learning System, Attain Essentials, Attain Objects for Dreamweaver, Authorware, Authorware Attain, Authorware Interactive Studio, Authorware Star, Authorware Synergy, Backstage, Backstage Designer, Backstage Desktop Studio, Backstage Enterprise Studio, Backstage Internet Studio, Design in Motion, Director, Director Multimedia Studio, Doc Around the Clock, Dreamweaver, Dreamweaver Attain, Drumbeat, Drumbeat 2000, Extreme 3D, Fireworks, Flash, Fontographer, FreeHand, FreeHand Graphics Studio, Generator, Generator Developer's Studio, Generator Dynamic Graphics Server, Knowledge Objects, Knowledge Stream, Knowledge Track, Lingo, Live Effects, Macromedia, Macromedia M Logo & Design, Macromedia Flash, Macromedia Xres, Macromind, Macromind Action, MAGIC, Mediamaker, Object Authoring, Power Applets, Priority Access, Roundtrip HTML, Scriptlets, SoundEdit, ShockRave, Shockmachine, Shockwave, Shockwave Remote, Shockwave Internet Studio, Showcase, Tools to Power Your Ideas, Universal Media, Virtuoso, Web Design 101, Whirlwind and Xtra are trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words or phrases mentioned within this publication may be trademarks, servicemarks, or tradenames of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. This guide contains links to third-party Web sites that are not under the control of Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party Web site mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites. Apple Disclaimer APPLE COMPUTER, INC. MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE ENCLOSED COMPUTER SOFTWARE PACKAGE, ITS MERCHANTABILITY OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES. THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. THIS WARRANTY PROVIDES YOU WITH SPECIFIC LEGAL RIGHTS. THERE MAY BE OTHER RIGHTS THAT YOU MAY HAVE WHICH VARY FROM STATE TO STATE. Copyright © 2000 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without prior written approval of Macromedia, Inc. Part Number ZDW40M100 Acknowledgments Project Management: Sheila McGinn Writing: Kim Diezel, Valerie Hanscom, Jed Hartman, Emily Ricketts Editing: Anne Szabla and Lisa Stanziano Production Management: John “Zippy” Lehnus Multimedia Design and Production: Aaron Begley and Noah Zilberberg Print Production: Chris Basmajian, Paul Benkman, Caroline Branch, and Rebecca Godbois Web Editing and Production: Jane Flint DeKoven and Jeff Harmon Special thanks to Jaime Austin, Chris Bank, Saam Barrager, Heidi Bauer, Jennifer Chapman, Winsha Chen, Kristin Conradi, Margaret Dumas, Peter Fenczik, Jean Fitzgerald, S Fred Golden, Stephanie Goss, Victor Grigorieff, Narciso (nj) Jaramillo, John Koch, David Lenoe, Eric Lerner, Charles Nadeau, Eric Ott, Jeff Schang, Mike Sundermeyer, and the Dreamweaver engineering and QA teams. First Edition: November 2000 Macromedia, Inc. 600 Townsend St. San Francisco, CA 94103 2 CONTENTS INTRODUCTION Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Learning Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Web development workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Typographical conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What’s new in Dreamweaver 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . HTML and Web technologies resources . . . . . . . . . . . . . . . . . . . . . . . Accessibility and Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 12 13 17 20 22 22 25 26 CHAPTER 1 Dreamweaver Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Take a guided tour of Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . The Dreamweaver work area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Set up the site structure for the tutorial . . . . . . . . . . . . . . . . . . . . . . . . Define a local site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create the site home page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Design a page in Layout view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Add content to the page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Work in Standard view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Use the Assets panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Insert Flash objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create a template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Check your site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The next steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 28 31 31 34 35 44 50 56 60 63 68 70 3 CHAPTER 2 Dreamweaver Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . .71 About the Dreamweaver work area . . . . . . . . . . . . . . . . . . . . . . . . . . . .72 About the different views in Dreamweaver . . . . . . . . . . . . . . . . . . . . . .73 Working with colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 About Web-safe colors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 Setting preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 Using Dreamweaver with other applications . . . . . . . . . . . . . . . . . . . . .89 Basic Customizing in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . .90 CHAPTER 3 Planning and Setting Up Your Site . . . . . . . . . . . . . .95 About site planning and design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 Using Dreamweaver to set up a new site . . . . . . . . . . . . . . . . . . . . . . .102 Editing an existing Web site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104 Editing a remote site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105 Removing a site from your list of sites . . . . . . . . . . . . . . . . . . . . . . . . .106 CHAPTER 4 Site Management and Collaboration . . . . . . . . . . . 107 About the Site window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108 Viewing and opening files in the Site window . . . . . . . . . . . . . . . . . . .112 About the site map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116 Using the site map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117 Setting up a remote site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123 About WebDAV and SourceSafe integration . . . . . . . . . . . . . . . . . . . .127 Troubleshooting remote site setup . . . . . . . . . . . . . . . . . . . . . . . . . . . .130 Using Check In/Check Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131 About Design Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134 Using reports to improve workflow . . . . . . . . . . . . . . . . . . . . . . . . . . .141 Getting and putting files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 Synchronizing the files on your local and remote sites . . . . . . . . . . . . .146 4 Contents CHAPTER 5 Setting Up a Document . . . . . . . . . . . . . . . . . . . . . . . 149 Creating, opening, and saving HTML documents . . . . . . . . . . . . . . .150 Setting document properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152 Selecting elements in the Document window . . . . . . . . . . . . . . . . . . .154 Using visual guides in the design process . . . . . . . . . . . . . . . . . . . . . . .157 Viewing and editing head content . . . . . . . . . . . . . . . . . . . . . . . . . . . .159 About automating tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160 CHAPTER 6 Designing Page Layout. . . . . . . . . . . . . . . . . . . . . . . . 167 About layout cells and tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169 Drawing layout cells and tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170 Moving and resizing layout cells and tables . . . . . . . . . . . . . . . . . . . . .176 Formatting layout cells and tables . . . . . . . . . . . . . . . . . . . . . . . . . . . .177 Setting layout width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179 Setting Layout View preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182 CHAPTER 7 Using Tables to Present Content . . . . . . . . . . . . . . . 183 Inserting a table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184 Selecting table elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 Formatting tables and cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 Resizing tables and cells. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194 Adding and removing rows and columns. . . . . . . . . . . . . . . . . . . . . . .196 Copying and pasting cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199 Sorting tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201 Exporting table data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202 CHAPTER 8 Using Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Deciding whether to use frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204 About creating frame-based Web pages . . . . . . . . . . . . . . . . . . . . . . . .205 Creating frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206 Selecting a frame or frameset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .208 Saving frame and frameset files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211 About frame and frameset properties. . . . . . . . . . . . . . . . . . . . . . . . . .212 Controlling frame content with links . . . . . . . . . . . . . . . . . . . . . . . . .218 Handling browsers that can’t display frames . . . . . . . . . . . . . . . . . . . .219 Using behaviors with frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220 Contents 5 CHAPTER 9 Managing and Inserting Assets. . . . . . . . . . . . . . . . . 221 Using the Assets panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222 Using favorite assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229 CHAPTER 10 Inserting and Formatting Text . . . . . . . . . . . . . . . . . 233 Inserting text and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234 Creating lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237 Setting fonts, styles, color, and alignment . . . . . . . . . . . . . . . . . . . . . .238 Using HTML styles to format text . . . . . . . . . . . . . . . . . . . . . . . . . . .244 Using CSS style sheets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248 Converting CSS styles to HTML tags . . . . . . . . . . . . . . . . . . . . . . . . .256 Checking spelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258 Searching and replacing text, tags, and attributes. . . . . . . . . . . . . . . . .258 CHAPTER 11 Inserting Images. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .267 Inserting an image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .268 Setting image properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269 Creating image maps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273 Using an external image editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277 Applying behaviors to images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280 CHAPTER 12 Using Dreamweaver and Fireworks Together . . . 281 Getting Fireworks files into Dreamweaver . . . . . . . . . . . . . . . . . . . . . .282 Launching Fireworks from within Dreamweaver . . . . . . . . . . . . . . . . .285 Editing Fireworks files placed in Dreamweaver . . . . . . . . . . . . . . . . . .288 Optimizing Fireworks images and animations placed in Dreamweaver 290 Updating Fireworks HTML placed in Dreamweaver. . . . . . . . . . . . . .293 Creating Web photo albums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293 6 Contents CHAPTER 13 Inserting Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 Inserting media objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297 Launching an external editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298 Using Design Notes with media objects . . . . . . . . . . . . . . . . . . . . . . .300 About Flash content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300 Using Flash button objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301 Using Flash text objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304 Setting Flash object properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305 Inserting Flash movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307 Inserting Generator objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .309 About Shockwave movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310 Adding sound to a page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311 Inserting Netscape Navigator plugin content. . . . . . . . . . . . . . . . . . . .313 Inserting an ActiveX control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .316 Inserting a Java applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318 Using parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .319 Using behaviors to control media . . . . . . . . . . . . . . . . . . . . . . . . . . . .320 CHAPTER 14 Editing HTML in Dreamweaver . . . . . . . . . . . . . . . . 321 Understanding basic HTML tags . . . . . . . . . . . . . . . . . . . . . . . . . . . .322 Inserting comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .327 Using the Dreamweaver Reference panel . . . . . . . . . . . . . . . . . . . . . . .328 About Roundtrip HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329 Using the Code view (or Code inspector) . . . . . . . . . . . . . . . . . . . . . .330 Inserting scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335 Opening and editing non-HTML files in Dreamweaver . . . . . . . . . . .338 Editing an HTML tag in the Design view . . . . . . . . . . . . . . . . . . . . . .338 Setting code formatting preferences. . . . . . . . . . . . . . . . . . . . . . . . . . .343 Cleaning up HTML source code. . . . . . . . . . . . . . . . . . . . . . . . . . . . .347 Cleaning up Microsoft Word HTML . . . . . . . . . . . . . . . . . . . . . . . . .348 Using external HTML editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350 Contents 7 CHAPTER 15 Linking and Navigation . . . . . . . . . . . . . . . . . . . . . . . 353 About document locations and paths . . . . . . . . . . . . . . . . . . . . . . . . .354 Creating links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .358 Managing links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .366 Creating jump menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369 Creating navigation bars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371 Attaching behaviors to links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374 CHAPTER 16 Reusing Content with Templates and Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 Creating templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377 Defining a template’s editable regions . . . . . . . . . . . . . . . . . . . . . . . . .381 Creating documents based on templates . . . . . . . . . . . . . . . . . . . . . . .388 Updating pages based on a template . . . . . . . . . . . . . . . . . . . . . . . . . .391 Exporting and importing XML content . . . . . . . . . . . . . . . . . . . . . . .392 Creating, managing, and editing library items . . . . . . . . . . . . . . . . . . .396 Using server-side includes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404 CHAPTER 17 Using Dynamic Layers . . . . . . . . . . . . . . . . . . . . . . . 407 About layers and HTML code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .408 Creating layers on your page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .409 Manipulating layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .412 Setting layer properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .417 Changing the stacking order of layers . . . . . . . . . . . . . . . . . . . . . . . . .420 Changing layer visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .420 Using tables and layers for layout . . . . . . . . . . . . . . . . . . . . . . . . . . . .421 Animating your layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425 Behavior actions for controlling layers timelines . . . . . . . . . . . . . . . . .434 8 Contents CHAPTER 18 Using Behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 Using the Behaviors panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .436 About events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .436 Attaching a behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .439 About behaviors and text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .441 Attaching a behavior to a timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . .442 Changing a behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .442 Updating a behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443 Creating new actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443 Downloading and installing third-party behaviors. . . . . . . . . . . . . . . .443 Using the behavior actions that come with Dreamweaver . . . . . . . . . .444 CHAPTER 19 Debugging JavaScript Code . . . . . . . . . . . . . . . . . . 473 Running the debugger. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .474 Finding and fixing logical errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . .476 CHAPTER 20 Creating Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 About CGI scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .482 About form objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .482 Creating a form. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .483 About form fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .485 Inserting checkboxes and radio buttons. . . . . . . . . . . . . . . . . . . . . . . .491 About lists and menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .493 About form buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .496 About form design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .498 Processing forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .499 Using behaviors with forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .500 CHAPTER 21 Testing and Publishing a Site . . . . . . . . . . . . . . . . . . 501 Checking for browser compatibility . . . . . . . . . . . . . . . . . . . . . . . . . .502 Using Behaviors to detect browsers and plugins. . . . . . . . . . . . . . . . . .503 Previewing in browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .504 Checking links in a page or site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .506 Checking download time and size . . . . . . . . . . . . . . . . . . . . . . . . . . . .509 Using Reports to test a site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .509 Contents 9 CHAPTER 22 Customizing Dreamweaver . . . . . . . . . . . . . . . . . . . . 513 Changing the default file type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514 Modifying the Objects panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .515 Creating a simple object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .516 About customizing Dreamweaver menus. . . . . . . . . . . . . . . . . . . . . . .517 Customizing the appearance of dialog boxes . . . . . . . . . . . . . . . . . . . .529 Changing default HTML formatting . . . . . . . . . . . . . . . . . . . . . . . . .530 Working with browser profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .532 Extending Dreamweaver: Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .536 Customizing the interpretation of third-party tags . . . . . . . . . . . . . . .537 APPENDIX Keyboard Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . 545 File menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .545 Edit menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .546 Page views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .546 Viewing page elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .547 Code editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .547 Editing text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .549 Formatting text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .550 Finding and replacing text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .550 Working in tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .551 Working with frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .551 Working with layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .552 Working with timelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .552 Working with images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .553 Managing hyperlinks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .553 Targeting and previewing in browsers . . . . . . . . . . . . . . . . . . . . . . . . .553 Debugging in browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .554 Site management and FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .554 Site map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555 Playing plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555 Working with templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555 Inserting objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556 History panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556 Opening and closing panels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557 Getting help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557 Keyboard Shortcut Matrix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .558 INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 10 Contents INTRODUCTION Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Macromedia Dreamweaver is a professional HTML editor for visually designing and managing Web sites and pages. Whether you enjoy the control of handcoding HTML or prefer to work in a visual editing environment, Dreamweaver makes it easy to get started and provides you with helpful tools to enhance your Web design experience. Dreamweaver includes many coding tools and features: an HTML, CSS, and JavaScript reference, a JavaScript Debugger, and code editors (the Code view and Code inspector) that allow you to edit JavaScript, XML, and other text documents directly in Dreamweaver. Macromedia Roundtrip HTML technology imports HTML documents without reformatting the code—and you can set Dreamweaver to clean up and reformat HTML when you want it to. The visual editing features in Dreamweaver also let you quickly add design and functionality to your pages without writing a line of code. You can view all your site elements or assets and drag them from an easy-to-use panel directly into a document. Streamline your development workflow by creating and editing images in Macromedia Fireworks, then importing them directly into Dreamweaver, or by adding Flash objects you create directly in Dreamweaver. Dreamweaver is fully customizable. Use Dreamweaver to create your own objects and commands, modify keyboard shortcuts, and even write JavaScript code to extend Dreamweaver capabilities with new behaviors, Property inspectors, and site reports. 11 System requirements The following hardware and software is required to run Dreamweaver. For Microsoft Windows: • An Intel Pentium processor or equivalent, 166 MHz or faster, running Windows 95, Windows 98, Windows 2000, Windows ME, or Windows NT (with Server Pack 3) • • • • Version 4.0 or later of Netscape Navigator or Microsoft Internet Explorer 32 MB of random-access memory (RAM) plus 110 MB of available disk space A 256-color monitor capable of 800 x 600 pixel resolution A CD-ROM drive For the Macintosh: • • • • A Power Macintosh running Mac OS 8.6 or 9.x 32 MB of random-access memory (RAM) plus 135 MB of available disk space A 256-color monitor capable of 800 x 600 pixel resolution A CD-ROM drive Installing Dreamweaver Follow these steps to install Dreamweaver on either a Windows or a Macintosh computer. To install Dreamweaver: 1 Insert the Dreamweaver CD into the computer’s CD-ROM drive. 2 Choose from the following options: • In Windows, choose Start > Run. Click Browse and choose the Dreamweaver 4 Installer.exe file on the Dreamweaver CD. Click OK in the Run dialog box to begin the installation. • On the Macintosh, double-click the Dreamweaver Installer icon. 12 Introduction 3 Follow the onscreen instructions. 4 If prompted, restart your computer. Learning Dreamweaver Macromedia Dreamweaver includes a variety of resources to help you learn the program quickly and become proficient in creating your own Web sites and pages. These resources include a printed book, online help pages, Guided Tour movies, a tutorial, and interactive lessons. You can also find regularly updated tips, TechNotes, examples, and information at the Dreamweaver Support Center on the Macromedia Web site. Start by viewing the Guided Tour movies to learn about Dreamweaver features. Next, complete the Dreamweaver tutorial. Finally, try the Dreamweaver lessons to learn how to accomplish specific tasks in Dreamweaver. Guided Tour movies The Guided Tour movies provide an animated overview of the Web development process and take you through a tour of Dreamweaver features. To view a Guided Tour movie, choose Help > Guided Tours and click one of the movie titles. When each movie is over, click the Home button to return to the list of movies, then click another movie. You can watch the whole tour or skip ahead to see particular sections. Tutorial The Dreamweaver tutorial is the best place to start if you want to get some handson experience creating pages in Dreamweaver. By working through the tutorial, you’ll learn how to create a sample Web site with some of the most useful and powerful features of Dreamweaver. The tutorial is in both Dreamweaver Help and the Using Dreamweaver book. You can also download a printable version of the tutorial at the Macromedia Web site. The tutorial includes sample pages and assets (images and Macromedia Flash files) to help you get started developing a Web site. Dreamweaver lessons Dreamweaver comes with a set of interactive lessons. Each lesson takes you through the steps of a specific task and includes sample pages that contain all the design and functional elements needed. Use the lessons as step-by-step guides with the sample pages, or as a guide as you work in your own pages. To locate the lessons, choose Help > Lessons and select a topic. Getting Started 13 Dreamweaver user guide (printed book) Using Dreamweaver provides a printed alternative to Dreamweaver Help, and contains information on using Dreamweaver commands and features. Certain reference topics about program options are not included in the printed book; see Dreamweaver Help for information on those topics. If you purchased the Electronic Software Download (ESD) version of Dreamweaver, you can download a printable version of Using Dreamweaver from the Dreamweaver Support Center at http://www.macromedia.com/support/ dreamweaver/documentation.html. Dreamweaver Help Dreamweaver Help provides comprehensive information about all Dreamweaver features, optimized for use online. For best results viewing Dreamweaver Help, use Netscape Navigator 4.0 or later or Microsoft Internet Explorer 4.0 or later. Dreamweaver Help makes extensive use of JavaScript. Make sure that JavaScript is enabled in your browser. If you plan to use the search feature, make sure that Java is enabled as well. 14 Introduction Dreamweaver Help includes the following components: Contents enables you to see all of the information organized by subject. Click top-level entries to view subtopics. The index, like a traditional printed index, can be used to find important terms and go to related topics. Search allows you to find any character string in all topic text. The search feature requires a 4.0 browser with Java enabled. Note: When you click Search, a Java security window may appear, asking for permission to read files on your hard disk. You must grant this permission for the search to work. The applet does not write anything to your hard disk, nor does it read any files outside Dreamweaver Help. • To search for a phrase, simply type the phrase in the text field. • To search for files that contain two keywords (for example, layers and styles), separate the search terms with a plus (+) sign. Getting Started 15 Context-sensitive help provides a Help button in each dialog box, or a question mark icon in inspectors, windows, and panels, that opens a relevant help topic. Click here to open Help The Dreamweaver Help navigation bar provides buttons you can click to move through topics. The right and left arrow buttons move to the previous or next topic in a section (following the topic order listed in the table of contents). Extending Dreamweaver The Extending Dreamweaver help system provide information on the Dreamweaver Document Object Model and the APIs (application programming interfaces) that allow JavaScript and C developers to create objects, commands, property inspectors, behaviors, and translators. Dreamweaver Support Center The Dreamweaver Support Center Web site is updated regularly with the latest information on Dreamweaver, plus advice from expert users, examples, tips, updates, and information on advanced topics. Check the Web site often for the latest news on Dreamweaver and how to get the most out of the program at http://www.macromedia.com/support/dreamweaver/. Dreamweaver discussion group Discuss technical issues and share helpful hints with other Dreamweaver users by visiting the Dreamweaver discussion group. You’ll find information about accessing the discussion group on the Macromedia Web site at http://www.macromedia.com/software/dreamweaver/discussiongroup/. 16 Introduction Web development workflow The Web development workflow starts with the process of defining a site’s strategy or goals, progresses to design (where you work out the look and feel of a prospective site), and moves into the production or development phase (where the site is built and pages are coded); the site is tested for functionality and to see if it meets its defined objectives, and then the site is published. Many developers also schedule periodic maintenance to ensure that the site remains current and functional. To make it easier for you to find the information you need as you develop Web sites, the Using Dreamweaver documentation is divided into broad sections that model this standard approach to Web development—site planning, design, development, testing, and publishing and maintenance. About site Planning Planning and organizing your site carefully from the start can save you time later on. Organizing your site includes much more than determining where the files will go: site planning often involves examining site requirements, audience profiles, and site goals. Additionally, you should consider technical requirements such as user access, and browser, plugin or download restrictions. Once you’ve organized your information and determined an operating structure, you begin creating your site. • Determine what strategy to employ and user issues to consider as you plan your site. See “Planning and Setting Up Your Site” on page 95. • Use the Dreamweaver site map to set up your site’s organizational structure. In the Dreamweaver Site window you can easily add, delete, and rename files and folders to change the organization as you need. See “Site Management and Collaboration” on page 107. If you work on a Web Development team, you may also be interested in these topics: • Set up systems that will prevent team members from overwriting files; see “Setting up the Check In/Check Out system” on page 132. • Use Design Notes to communicate with Web team members; see “Saving file information in Design Notes” on page 135. Getting Started 17 About designing Web pages Most Web design projects start with storyboards or flowcharts that are turned into sample pages. Use Dreamweaver to create mock-up sample pages as you work toward a final design. Mock-ups usually show the design layout, site navigation, technical components, themes and color, and graphic images or other media elements. • Create HTML documents in Dreamweaver, easily add page title, or background color. See, “Setting Up a Document” on page 149. • Dreamweaver Layout view and layout tools let you quickly design Web pages by drawing and then rearranging the page structure. See, “Designing Page Layout” on page 167. • Use the Dreamweaver Objects panel to design and quickly add tables, create frame documents, design forms, and work with layers. See “Using Tables to Present Content” on page 183, “Using Frames” on page 203, “Using Dynamic Layers” on page 407, and “Creating Forms” on page 481. About adding content Using Dreamweaver, you can easily add a variety of content to Web pages. Add assets and design elements, such as text, images, colors, movies, sound, and other forms of media. • The Assets panel lets you easily organize the assets in a site; you can then drag most assets directly from the Assets panel into a Dreamweaver document. See “Managing and Inserting Assets” on page 221. • Type directly in a Dreamweaver document, or import text from other documents, then format the text using the Dreamweaver Property inspector, or HTML Styles panel. You can also easily create your own Cascading Style Sheets. See “Inserting and Formatting Text” on page 233. • Insert images, including rollover images, image maps, and Fireworks sliced images. Use alignment tools to position images in a page. See “Inserting Images” on page 267 and “Using Dreamweaver and Fireworks Together” on page 281. • Insert other types of media in a Web page, such as Flash, Shockwave, and QuickTime movies, sound, and applets. See “Inserting Media” on page 297. • Add content in the Dreamweaver code editor: Use the Dreamweaver Code view or Code inspector to write your own HTML or JavaScript code. “Editing HTML in Dreamweaver” on page 321. 18 Introduction • With Dreamweaver you can create standard HTML links, including anchor links and e-mail links, or easily set up graphical navigation systems, such as jump menus and navigation bars. See “Linking and Navigation” on page 353. • Dreamweaver templates and library files let you easily apply reusable content in your site. You can create new pages from the template, then add or change content in the editable areas. See “Reusing Content with Templates and Libraries” on page 375. About interactivity and animation Many Web pages are static, containing only text and images. Dreamweaver allows you to go beyond static pages, using interactivity and animation to capture visitors’ interest. You can give visitors feedback as they move and click, demonstrate concepts, validate form data without contacting the server—in short, you can let visitors see and do more within the page. There are several ways to add interactivity and animation to your pages using Dreamweaver: • Use timelines to create animations that do not require plugins, ActiveX controls, or Java. Timelines use dynamic HTML to change the position of a layer or the source of an image over time or to call behavior actions automatically after the page has loaded. See “Using Dynamic Layers” on page 407. • Use behaviors to perform tasks in response to specific events, such as highlighting a button when the visitor passes the pointer over it, validating a form when the visitor clicks the Submit button, or opening a second browser window when the main page is finished loading. See “Using Behaviors” on page 435. • Debug custom JavaScript code. See “Debugging JavaScript Code” on page 473. • Use forms to allow your site visitors to enter data directly on the Web page. See “Creating Forms” on page 481. Getting Started 19 About testing and publishing your site Your site is complete and ready for the world—but before you publish it on a server, you must test the site. Depending on the size of the project, client specifications, and kinds of browsers that visitors will use, you may need to move your site to a staging server where it can be tested and edited. When corrections have been made, you publish the site where the public can access it. Once the site is published, establish a maintenance cycle to ensure quality, respond to user feedback, and update the site’s information. Use the following Dreamweaver features to test and publish your sites: • To add new tags in a page or fix your code, use the Dreamweaver Reference panel to look up JavaScript, CSS and HTML code. See “Using the Dreamweaver Reference panel” on page 328. • Use the JavaScript Debugger to help you fix JavaScript errors in your code. The debugger lets you set breakpoints in the code, then allows you to view the code as a page is debugged right in Dreamweaver. See “Debugging JavaScript Code” on page 473. • Run browser and plugin checks, test and fix links in your documents, and run site reports to check HTML files for common mistakes. See “Testing and Publishing a Site” on page 501. • In the Dreamweaver Site window you’ll find many tools to help you manage your site, transfer files to and from a remote server, set up a Check In/Check Out process to prevent files from being overwritten, and synchronize the files on your local and remote sites. See “Site Management and Collaboration” on page 107. Where to start This guide includes information for readers at a variety of levels. To get the most out of the documentation, start by reading the parts that are most relevant to your level of experience. For HTML novices: 20 Introduction 1 Begin by watching the Guided Tour movies. From the Dreamweaver main menu, choose Help > Guided Tours. 2 Next, work through the Dreamweaver tutorial. Choose Help > Tutorial, or follow the steps in the printed manual. 3 Work through the lessons for the topics that interest you. Choose Help > Lessons, then select a lesson. 4 Progress through “Dreamweaver Basics” on page 71, “Planning and Setting Up Your Site” on page 95, “Site Management and Collaboration” on page 107, and “Linking and Navigation” on page 353. 5 To learn about formatting text and including images in your pages, read “Inserting and Formatting Text” on page 233 and “Inserting Images” on page 267. That’s all you really need to begin producing high-quality Web sites, but when you’re ready to learn how to use more advanced layout and interaction tools, you can proceed through the rest of the book in order. You may want to skip “Customizing Dreamweaver,” at least at first. For experienced Web designers who are new to Dreamweaver: 1 Begin by watching the Guided Tour movies. From the Dreamweaver main menu, choose Help > Guided Tours. 2 Work through the Dreamweaver tutorial to learn the basics of using Dreamweaver. Choose Help > Tutorial, or follow the steps in the printed manual. 3 Work through the lessons for the topics that interest you. Choose Help > Lessons, then select a lesson. 4 Read “Dreamweaver Basics” on page 71 for a further overview of the Dreamweaver user interface. 5 Although much of the material in “Site Management and Collaboration” on page 107 and “Linking and Navigation” on page 353 is probably familiar to you, skim those chapters to see how these familiar concepts are implemented in Dreamweaver; pay particular attention to Using Dreamweaver to set up a new site. Then read “Site Management and Collaboration” on page 107. 6 “Inserting and Formatting Text” on page 233 and “Inserting Images” on page 267 provide useful information on the details of using Dreamweaver to create basic HTML pages. 7 Read the overview at the beginning of each subsequent chapter to determine whether its topics are of interest to you. For experienced Web designers who are familiar with Dreamweaver 3: 1 Begin by reading “What’s new in Dreamweaver 4” on page 22. Follow the cross-references from that section to sections covering new Dreamweaver features. 2 You may want to skim “Dreamweaver Basics” on page 71 to learn about new aspects of the Dreamweaver user interface. 3 Check out the Dreamweaver lessons; choose Help > Lessons for a list of interactive lessons you can try. 4 If you’re interested in customizing and extending Dreamweaver, read “Customizing Dreamweaver” on page 513. Getting Started 21 Typographical conventions The following typographical conventions are used in this guide: • Code font • Italic code font indicates HTML tag and attribute names as well as literal text used in examples. indicates replaceable items (sometimes called metasymbols) in code. • Bold roman text indicates text for you to enter verbatim. What’s new in Dreamweaver 4 The new features in Dreamweaver 4 enhance HTML editing, make it easier to design pages, improve site and asset management, let you create your own Flash objects, streamline your workflow, improve team collaboration, and allow you to customize and extend Dreamweaver. Enhanced code editing The Dreamweaver toolbar allows you to manage how you view a page—Design view, Code view, or a view of both code and design. The toolbar provides easy access to commonly used features such as Preview in Browser and Design Notes. See “Using the toolbar” on page 78 Code view provides a new way to view HTML source code directly in the Dreamweaver Document window. See “Opening the Code view (or Code inspector)” on page 331. You can also edit non-HTML documents such as JavaScript files and XML files directly in the Dreamweaver Code view. See “Inserting scripts” on page 335. Integrated code editors Dreamweaver now has integrated, state-of-the-art code editors—the Code view and the Code inspector. You can set word wrapping, code indenting, live syntax coloring, and more from the Options menu in either of these editors. See “Setting Code view (or Code inspector) options” on page 333. The Reference panel is a quick reference tool for HTML, JavaScript, and CSS. It provides information about the specific tags you are working with in the Code view (or Code inspector). See “Using the Dreamweaver Reference panel” on page 328. The Code Navigation pop-up menu allows you to select code for JavaScript functions in a page; by using this menu, you can quickly navigate JavaScript code while working in Code view. See “Viewing script functions” on page 337. The JavaScript Debugger lets you debug JavaScript document while in Dreamweaver. For example, you can set breakpoints to control the code you want to examine. See “Debugging JavaScript Code” on page 473. 22 Introduction Easier page design Layout view lets you quickly design your Web pages by drawing boxes (tables or cells) to which you can add content. See “Drawing layout cells and tables” on page 170. make it easier for you to identify the editable regions in a template file. Templates now display a tab that contains the editable region’s name and a bounding rectangle. See “Creating templates” on page 377. Improved templates can now be defined as soon as you create a new style. You can also easily attach an existing CSS style sheet with a button in the CSS Styles panel. See “Using CSS style sheets” on page 248. CSS style sheets Improved integration are now built right into Dreamweaver. You can pick from a set of predefined Flash buttons and insert them into your document or have your Flash designer create custom button templates for you. See “Using Flash button objects” on page 301 and “Using Flash text objects” on page 304. Flash buttons and Flash text Roundtrip slicing lets you work seamlessly between Dreamweaver and Fireworks 4. You can edit and update images and HTML tables you import from Fireworks. You can also edit in Dreamweaver or Fireworks and have the changes preserved in both places. See “Editing Fireworks files placed in Dreamweaver” on page 288. The Web-safe color picker allows you to easily match colors with graphics. With just one click, you can select a color from anywhere on the desktop and the color picker snaps to the nearest Web-safe color. See “Working with colors” on page 87. Getting Started 23 Streamlining your workflow The Assets panel allows you to manage your site’s assets. You can see all the images, colors, external URLs, and scripts, as well as Flash, Shockwave, QuickTime, template, and library items in a central location. Preview assets, and then drag them right into place on your HTML document. Save commonly used assets in a favorites list and reuse them across sites. See “Using the Assets panel” on page 222 and “Using favorite assets” on page 229. Improved Design Notes let you attach notes to a file so you can track changes or communicate about development issues with other members of your team. You can insert and view comments directly in the Dreamweaver Site window. See “About Design Notes” on page 134 and “Using reports to improve workflow” on page 141. Integrated e-mail allows you to communicate with team members. When a file is checked out by someone else, you can now click on the team member’s name to send an e-mail message. See “Setting up the Check In/Check Out system” on page 132. lets you use several predefined reports to test common HTML document problems, such as untitled documents or missing alt tags. You can also write custom reports to suit your needs, display report results, and open problem files within the Report results window. See “Setting up the Check In/Check Out system” on page 132 and “Creating reports” on page 510. Site reporting SourceSafe integration If you own SourceSafe, you can now check files into and out of SourceSafe while working in Dreamweaver. See “Using Dreamweaver with Visual SourceSafe” on page 128. now use Dreamweaver to transfer files using the WebDAV protocol. See “Using Dreamweaver with the WebDAV protocol” on page 127. WebDAV integration The Package Manager (formerly the Extension Manager) easily install extensions with a single click. Visit the Macromedia Exchange and download useful extensions to make your job easier. See “Adding extensions to Dreamweaver” on page 93. Common user interface have a new interface that is common to all Macromedia Web publishing products. This new interface allows you to edit existing keyboard shortcuts, create new shortcuts for menu items, and delete keyboard shortcuts you don’t want. You can also switch between sets of keyboard shortcut configurations. See “Using the Keyboard Shortcut Editor” on page 90. Keyboard shortcuts Window management is now improved: all windows snap into place. When you open a new window, Dreamweaver prevents it from overlapping visible panels. now have a new Macromedia look and behave consistently across the Web publishing products. All panels have icons and text so that you can easily identify them. Panels all use system colors and fonts on both Windows and Macintosh systems, and have consistent snapping and dragging behaviors. Panels 24 Introduction HTML and Web technologies resources The following are some useful resources available on the Web: The HTML 4.0 specification (http://www.w3.org/TR/REC-html40/) is the official specification for HTML from the World Wide Web Consortium. Index DOT HTML (http://www.blooberry.com/indexdot/html/) is a comprehensive listing of HTML tags, attributes, and values, as well as their compatibility with the various browsers. The ZDNet Developer Tag Library (http://www.zdnet.com/devhead/resources/ tag_library/) is another listing of information about all HTML tags. The Cascading Style Sheets, level 1 specification (CSS1) (http://www.w3.org/TR/ REC-CSS1) is the official specification for style sheets from the World Wide Web Consortium. Web Review Style Sheets Reference Guide (http://webreview.com/guides/style/ style.html) explains what CSS styles are and which browsers they work in. “CGI Scripts for Fun and Profit” (http://www.hotwired.lycos.com/webmonkey/ 99/26/index4a.html) is an article from the Hotwired Webmonkey site on incorporating ready-made CGI (Common Gateway Interface) scripts into your pages. The CGI Resource Index (http://www.cgi-resources.com/) is a repository of all things related to CGI, including ready-made scripts, documentation, books, and even programmers for hire. The Common Gateway Interface site (http://hoohoo.ncsa.uiuc.edu/cgi/) includes an introduction to CGI. (http://www.bbsinc.com/iso8859.html) lists the entity names used in ISO 8859-1 (Latin-1). Entities Table The Dynamic HTML Events page (http://msdn.microsoft.com/workshop/author/ dhtml/reference/events.asp#om40_event) provides information about events in Microsoft Internet Explorer. Microsoft ASP Overview pages (http://msdn.microsoft.com/workshop/server/ asp/ASPover.asp) provide information about Active Server Pages (ASP). Sun JSP page (http://java.sun.com/products/jsp/) provides information about JavaServer Pages (JSP). The PHP pages (http://www.php.net/) provide information about PHP: Hypertext Preprocessor. Allaire ColdFusion product page (http://www.allaire.com/Products/ColdFusion) provides information about ColdFusion. Getting Started 25 The XML.com site (http://www.xml.com) provides information, tutorials, and tips about Extensible Markup Language (XML), as well as other Web technologies. JavaScript Bible, by Danny Goodman (IDG Books), comprehensively covers the JavaScript 1.2 language. JavaScript: The Definitive Guide, by David Flanagan (O’Reilly & Associates), provides reference information for every JavaScript function, object, method, property, and event handler. Accessibility and Dreamweaver Macromedia supports the creation of great Web experiences that are accessible to everyone, including those with disabilities. We encourage the implementation of international standards to guide developers of accessible sites, including the guidelines offered by the World Wide Web Consortium (W3C). Many government policies on Web accessibility, including those of the United States, reference W3C guidelines. W3C guidelines on Web content encourage developers to adopt design and coding practices for accessibility, many of which are robustly supported by Macromedia products. For more information on W3C guidelines, please consult the Web Content Authoring Guidelines (http://www.w3.org/TR/ WAI-WEBCONTENT/full-checklist.html). For the latest information on product features and resources that support accessible design, please see Macromedia's accessibility page (http:// www.macromedia.com/accessibility/). 26 Introduction 1 CHAPTER 1 Dreamweaver Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Dreamweaver tutorial walks you through the steps of building Web pages. You’ll learn how to use Macromedia Dreamweaver to define a local site, and you’ll use Dreamweaver panels and tools to create and edit Web documents. In this tutorial, you’ll create Web pages for Compass, a fictitious company that specializes in adventure travel. If you’re new to Dreamweaver, start at the beginning of the tutorial and work your way through the end. If you’re already familiar with Dreamweaver, you may want to start at “Use the Assets panel” on page 56; this section and those that follow it focus on new or changed features in Dreamweaver such as the Assets panel, Flash buttons and text, using a template, running a site report and adding a Design Note. The tutorial takes approximately one to two hours to complete, depending on your experience, and focuses on the following Dreamweaver tasks: • • • • • • • • • • Defining a local site Creating a page in Layout view Inserting an image and a rollover image Working with tables in Standard view Creating a link to another document Inserting assets from the Assets panel Inserting Flash Text and Flash Button objects Creating and applying a template Running a site report Adding a Design Note Note: This tutorial demonstrates some features that are supported only in 4.0 or later browsers. 27 Take a guided tour of Dreamweaver Before you get started, watch the Guided Tour movies to familiarize yourself with the Web development process and with Dreamweaver features. 1 In Dreamweaver, choose Help > Guided Tour. 2 Click a movie title. 3 Close the movie when you finish. The Dreamweaver work area Let’s start with a brief overview of the Dreamweaver work area. • If you haven’t already launched Dreamweaver, double-click the Dreamweaver icon to launch it. The Dreamweaver work area accommodates different styles of working and levels of expertise. When you launch Dreamweaver, the following work area items open: Toolbar Document window Objects panel Floating panel Tag selector Launcher bar Property inspector • The Document window displays the current document as you create and edit it. • The Objects panel contains icons you click to insert objects in your document, and to change the way you work in a document. 28 Chapter 1 • Dreamweaver provides many floating panels, such as the HTML Styles panel and the Code inspector, which enable you to work with other Dreamweaver elements. • The Launcher bar contains buttons for opening and closing your most frequently used inspectors and panels. • The Property inspector displays properties for the selected object or text, and lets you modify those properties. (Which properties appear in the inspector depend on the object actively selected in the document.) To open Dreamweaver windows, inspectors, and panels, use the Window menu. A check mark next to an item in the Window menu indicates that the named item is currently open (though it may be hidden behind other windows). To display an item that isn’t currently open, choose the item name from the menu or use its keyboard shortcut. Working in Dreamweaver Dreamweaver can display a document in three ways: in Design view, in Code view, and in a split view that shows both the design and code. (To change the view in which you’re working, select a view in the Dreamweaver toolbar.) By default, Dreamweaver displays the Document window in Design view. In addition, you can work with the Dreamweaver Design view in two different ways—in Layout view and Standard view. (You select these views in the View category of the Objects panel.) In Layout view you can design a page layout, insert graphics, text, and other media; in Standard view, in addition to inserting graphics text and media, you can also insert layers, create frame documents, create tables, and apply other changes to your page—options that aren’t available in Layout view. How the tutorial files are arranged Both the completed and partially completed HTML files used in this tutorial are in the Compass_Site folder in the Tutorial folder. Images and other associated files for the site are also in the Compass_Site folder. Each tutorial file has a meaningful name—for example, the HTML file that contains travel destination information is named Destinations.html. The partially completed files—which you’ll be working on—have names similar to their completed file counterparts, except they begin with DW4_; the partially completed version of Destinations.html, for example, is called DW4_Destinations.html. Dreamweaver Tutorial 29 Preview the completed Web site Next, view pages in the completed Web site to get an idea of what you’ll be working toward. 1 If you haven’t already done so, launch Dreamweaver. 2 In Dreamweaver, choose File > Open. In the file browsing dialog box, navigate to the Dreamweaver 4 folder (where you installed Dreamweaver); then navigate to Tutorial/Compass_Site. 3 In the Compass_Site folder, select CompassHome.html, and then click Open to open the Compass home page in the Document window. Do not edit this page; you will create your own version of this page. 4 Choose File > Preview in Browser and select a browser in which to view the Compass home page. (Use a version 4.0 or later browser to view this site.) 5 Move the pointer over the navigation buttons to see rollover image effects. Click the navigation buttons to explore the site. 30 Chapter 1 6 Close the browser when you’re finished looking at the site. 7 Open a new blank document in Dreamweaver, choose File > Open. 8 Close the CompassHome.html file, which is open in Dreamweaver. Set up the site structure for the tutorial There are two ways you can work with the tutorial files—use a predefined local site or define a local site. • If you’re new to Dreamweaver, you may want to define the local site for the tutorial so you’ll know how to set up a local site when you’re ready to work on your own sites. • If you’re already familiar with defining a site using Dreamweaver, you may want to use the predefined tutorial site. From the Dreamweaver main menu choose Site > Open Site, then select Tutorial - Dreamweaver. The Tutorial Dreamweaver site links to the Compass_Site files located in the Dreamweaver 4/Tutorial folder. After selecting the local site, skip to the “Create the site home page” on page 34 section of the tutorial. Note: If you select the predefined site, the site name displayed in the tutorial screenshots will not match; instead of seeing my_tutorial, you’ll see Tutorial Dreamweaver as the site name in your screens. Define a local site When you define a local site, you tell Dreamweaver where you plan to store all the files for a particular site. To work effectively in Dreamweaver, always define a local site for each Web site you create. For this tutorial, you’ll specify the Compass_Site folder as the local site folder. 1 If it isn’t already open, launch Dreamweaver. A blank document opens. 2 Choose Site > New Site. 3 In the Site Definition dialog box, make sure Local Info is selected in the Category list. 4 In the Site Name field, type my_tutorial. The site name lets you easily identify and select a site from a list of sites you’ve defined. 5 Click the folder icon to the right of the Local Root Folder field. Dreamweaver Tutorial 31 6 In the dialog box that appears, navigate to the Tutorial/Compass_Site folder, and do one of the following: • In Windows, click Open, then click Select when Compass_Site appears in the Select field. • On the Macintosh, click Choose to select the Compass_Site folder. The Local Root Folder field updates to display the path to the local site. Note: The complete path to the Compass_Site folder may vary, depending on where you installed Dreamweaver. 7 Under Cache, do one of the following: • Select Enable Cache (Windows) to create a cache file for the site. • Select Use Cache to Speed Link Updates (Macintosh) to create a cache file for the site. Caching the files in the Compass_Site folder creates a record of existing files so Dreamweaver can quickly update links when you move, rename, or delete a file. 8 32 Chapter 1 Click OK to close the dialog box. 9 Click OK to the cache message. The Site window now displays a list of all the folders and files in the local site. The list also acts as a file manager, allowing you to copy, paste, delete, move, and open files just as you would on a computer desktop. Dreamweaver Tutorial 33 Create the site home page Now that a site structure is set up for storing pages and assets for the Compass site, you’ll create the first page—a home page for the site. As you build this page, you’ll add images, text, and Flash assets; your document will contain the same design components as the completed Compass home page. Save your document Begin by saving the document you’re working in. 1 Leave the Site window open, and click the Document window to make it active. The Site window remains open in the background. 2 Choose File > Save. 3 In the Save As dialog box, select the Compass_Site folder as the location for this document. 4 In the File Name field, type my_CompassHome.html. 5 Click Save. Notice that the document name now appears at the top of the Document window. 34 Chapter 1 Define the document page title Though the document has a file name, notice it is still labelled Untitled Document; that’s because it needs an HTML document name, or page title. Defining a page title helps site visitors identify the page they’re browsing: the page title appears in the browser title bar and in the bookmark list. If you create a document without a page title, the document appears in the browser with the title Untitled Document. In this part of the tutorial, you’ll title your page. 1 With the Document window active, choose View > Toolbar if the toolbar isn’t already visible. The Dreamweaver toolbar appears above the Document window 2 In the Title field, type Compass Home Page; then click in the Document window to see the page title update in the Document window’s title bar. 3 Save your file. Design a page in Layout view You’ll start your first page while working in the Dreamweaver Design view. You’ll lay out the page then insert images and text. The page you complete in this section of the tutorial will look similar to this page. Dreamweaver Tutorial 35 Work in Layout view Dreamweaver has two visual design views—Standard view and Layout view. You’ll start by working in Layout view, which allows you to draw layout cells or layout tables into which you can add content such as images, text, or other media. In this part of the tutorial, you’ll lay out the page; in the next section you’ll add content. (Once you’re comfortable with these two tasks, you may find it easier to add layout and content together.) 1 In the Objects panel, click the Layout View icon if it isn’t already selected. Draw Layout Cell icon Draw Layout Table icon Layout View icon The Getting Started in Layout View dialog box appears and describes the Layout view options. 36 Chapter 1 2 Review the options, then click OK to close the dialog box. 3 In the Objects panel under Layout notice the Layout options—Draw Layout Cell and Draw Layout Table—are now available; these options aren’t available in Standard view. Draw layout cells In Layout view you can draw layout cells and layout tables to define the design areas of a document. This task is easier to accomplish if you prepare a sample of the page you’re creating before you begin laying out a page. Look at the following sample layout to get an idea of the page layout you’re creating in this section of the tutorial. There’s a cell for the Compass logo, a table with three cells for site navigation buttons, a cell for another graphic, and a table for three cells that will hold text. You’ll draw tables and cells similar to this layout as you work in your document. First, you’ll draw a layout cell in which you’ll insert the Compass logo. 1 Click in the Document window of the my_CompassHome document to make the document active. 2 If they aren’t already open, open the following work area tools: • The Objects panel (choose Window > Objects), which you’ll use to add objects to your document. • The Property inspector (choose Window > Properties), which you’ll use to set properties or attributes for objects in your document. If the Property inspector isn’t already expanded, click the expander arrow in the lower right corner so you can see all the property options. 3 In the Objects panel, click the Draw Layout Cell icon. Dreamweaver Tutorial 37 4 Move the pointer to the Document window; the mouse pointer changes to a drawing tool (looks like a small cross). Click in the upper left corner of the document, then drag to draw a layout cell. When you release the mouse, a layout cell appears in a layout table. Layout Cell Layout Table The layout table expands to fill the Document window, and defines the page layout area. The white rectangle is the layout cell you drew. You can place additional layout cells in the gray area of the layout table. Resize layout cells To precisely design a page, you can set the size of cells you add in a document. You can also reposition cells in the page. 1 Click the border of the layout cell to select it. Handles appear around a selected layout cell: 38 Chapter 1 2 To resize this layout cell, do one of the following: • In the Property inspector for the layout cell, type 510 in the Fixed field to set the cell’s width to 510 pixels, then click in the document to see the cell width change. Note: If you enter a pixel width that is larger than the width of the layout table, or that causes the cell to overlap another cell in a layout table, Dreamweaver alerts you and adjusts the cell width to a valid width. • On the right side of the layout cell, drag the middle resize handle to the right until the cell is the desired width. When you release the mouse, the cell’s width is displayed in the column header area along the top of the layout table. Add multiple layout cells Next you’ll add three layout cells below the logo cell you just created. Later you’ll insert the page’s navigation buttons in these cells. 1 In the Objects panel, click the Draw Layout Cell icon; then hold down the Control key (Windows) or Command key (Macintosh). 2 In the Document window, position the pointer below the cell you drew for the logo; then drag to draw a layout cell. Continue to hold the Control key (Windows) or Command key (Macintosh) and draw two more layout cells. Your screen should look similar to this. Dreamweaver Tutorial 39 Move a layout cell If you need to line up the cells next to each other you can resize and move the layout cells as you need. You change the size of a layout cell by using one of its resize handles. You cannot click and drag a cell to move it to a new position. If you need to move a layout cell to reposition it in a document, follow these steps. 1 Click the border of a layout cell to select it. 2 To move the layout cell, do one of the following: • Use the arrow keys. • Hold down Shift and use the arrow keys to move a layout cell 5 pixels at a time. Group cells in a layout table Now you’ll create a table of the navigation button cells you just created. Grouping the cells in a table enables you to control the cell spacing and to easily move the cells as a group if you want change the page layout. You’ll create a table for the navigation buttons that is the same width as the logo cell above it. Use Draw Layout Table to group the navigation button images. 40 Chapter 1 1 In the Objects panel, click the Draw Layout Table icon. 2 In the Document window, position the pointer at the top left corner of the first navigation button cell; then drag the pointer so the table contains the three cells and is the length of the logo cell. 3 Release the mouse to see the cells grouped in a new table. You’ve created a table that contains three layout cells (the white area in the table) and an empty space (the gray area in the table). Move the layout table You can select and move a layout table to other areas in a document. You cannot, however, move a layout table so that it overlaps another. Next you’ll move the table you just created a few pixels to the right to offset the alignment of the navigation buttons to the logo when they are inserted in the page. 1 In the Document window click the tab on the Layout table to move it. 2 Drag the layout table a few pixels to the right to reposition it, then drag one of the table’s right resize handles to align the right sides of the logo and navigation button layout cells. Notice that as you create new tables and cells, gridlines appear outlining the layout area. You can use these gridlines to align the layout elements. Dreamweaver Tutorial 41 Add another layout cell Next add a layout cell for the Learn More About graphic. 1 In the Objects panel, click the Draw Layout Cell icon. 2 In the Document window, draw a new cell in the space below the navigation button table. Your page should look similar to this: Create a layout table In the last section you used cells to create a table. Now, you’ll start with a table and add cells. 42 Chapter 1 1 In the Objects panel, click the Draw Layout Table icon. 2 Move the pointer to the Document window. In the area below the layout cell you just added, drag the pointer to the right to align with the right side of the topmost cell; then drag down to the bottom of the Document window. Draw layout cells in a table Now add layout cells into which you’ll add text about travel locations. 1 In the Objects panel, click the Draw Layout Cell icon and move the pointer to the layout table you just drew. 2 Draw a table cell approximately one-third the space in the table. 3 Click the border of the layout cell to select it; then in the Property inspector’s Fixed field, type 170 to set the cells width. 4 Draw another table cell approximately one-third the space in the table next to the first cell. 5 Click the border of the layout cell to select it; then in the Property inspector’s Fixed field, type 170 to set the cells width. 6 Draw the last table cell in the remaining space in the table. Resize or move the cells to adjust the size or position of the cells as needed. Your screen should look similar to this: Dreamweaver Tutorial 43 Add content to the page Now that you’ve laid out the areas of the page, you’ll add the graphical content, such as the logo, and rollover images. Insert images You’ll learn two ways to insert images in Dreamweaver—using Dreamweaver’s main menu and using the Objects panel. 1 Click anywhere in the logo layout cell (the topmost layout cell). Clicking in a layout cell places the insertion point in the cell without selecting the cell. 2 Choose Insert > Image. 3 In the Select Image Source dialog box, locate the Compass_Site folder and navigate to the Assets folder, then the images folder; click the compass_logo.gif to select it. 4 Make sure the Relative To pop-up menu located at the bottom of the dialog box is set to Document, then click Select (Windows) or Open (Macintosh) to select the image. The image appears in the layout cell. 5 Click anywhere in the Learn More About layout cell to place the insertion point in the cell. 6 In the Objects panel’s Common category, click the Insert Image icon. 7 In the Select Image Source dialog box, locate the Compass_Site/Assets/images folder, and navigate to learnMoreAbout.gif; then click Select (Windows) or Open (Macintosh) to select the image. The image appears in the layout cell. 8 44 Chapter 1 Choose File > Save to save the changes you made to the home page. Create a rollover image A rollover image is an image whose display changes when the pointer passes (“rolls”) over it. You’ll use the Insert Rollover Image command to create three rollover images for the navigation buttons—Trip Planner, Destinations, and Travel Logs. A rollover image consists of two images: the image displayed when the page first loads in the browser, and the image displayed when the pointer moves over the original image. Be sure to use images that are the same size. The first image dictates the size of the display, so if the second image is much smaller or much larger, the results will look distorted or unprofessional. Next, you’ll add a navigation button with a rollover image to your page. Then you’ll add the other navigation buttons and preview the page in a browser to test the rollovers. 1 In the Document window, click in the first cell of the navigation button table. This tells Dreamweaver where you want the image inserted. 2 To insert a rollover image, do one of the following: • In the Common category of the Objects panel, click the Insert Rollover Image icon. • Choose Insert > Interactive Image > Rollover Image. 3 In the Insert Rollover Image dialog box, type planner in the Image Name field. This gives the image a unique name, and makes it easily identifiable in the HTML code. 4 In the Original Image field, click Browse; then navigate to MenuTripPlanner.gif and click Select (Windows) or Open (Macintosh). This tells Dreamweaver which image to display when the page first loads. 5 In the Rollover Image field, click Browse; then navigate to MenuTripPlanner_on.gif and click Select (Windows) or Open (Macintosh). This tells Dreamweaver which image to display when the pointer is over the original image. Dreamweaver Tutorial 45 6 Make sure the Preload Rollover Image option is selected so the rollover images load when the page loads in the browser, ensuring a quick transition between images when a user moves the pointer over the original image. 7 Click OK to close the dialog box. The image appears in the document. 8 Resize the layout cell to fit the image. Create the other rollover images Now you’ll add rollover images for the other navigation buttons. 46 Chapter 1 1 In the Document window, click in the second navigation button cell; then in the Common category of the Objects panel, click the Insert Rollover Image icon. 2 In the Insert Rollover Image dialog box, type destinations in the Image Name field to provide the image a unique name. 3 In the Original Image field, click Browse, then navigate to and select MenuDestinations.gif. 4 In the Rollover Image field, click Browse, then navigate to and select MenuDestinations_on.gif. 5 Make sure the Preload Rollover Image option is selected, then click OK to close the dialog box. 6 In the Document window, click in the third navigation button cell; then in the Objects panel’s Common category, click the Insert Rollover Image icon. 7 In the Insert Rollover Image dialog box, type travellog in the Image Name field to provide the image a unique name. 8 In the Original Image field, click Browse then navigate to and select MenuTravelLogs.gif. 9 In the Rollover Image field, click Browse then navigate to and select MenuTravelLogs_on.gif. 10 Make sure the Preload Rollover Image option is selected, then click OK to close the dialog box. 11 Resize the two layout cells to fit the image. Preview your document You cannot view rollover behavior in the Dreamweaver Document window; rollover images work only in a browser. However, you can preview the document in Dreamweaver to see its browser-related functions. You do not have to save the document before you preview it. 1 Press F12 to see your document in a Web browser. Move the mouse pointer over the rollover images you created to see them change. 2 When you finish previewing the file, close the browser window. 3 Return to the Dreamweaver Document window and choose File > Save to save the changes you made to the home page. Dreamweaver Tutorial 47 Insert text Now you’ll add text in the cells of the bottom layout table. In Dreamweaver, you can type content directly into a layout cell, or you can cut and paste content from another document into a layout cell. In this tutorial, you’ll add text to the layout cell by copying and pasting content from an existing text file to a layout cell. 1 Choose File > Open; then, in the Compass_Site folder, open DW4_HomeText.txt. The DW4_HomeText.txt document opens in a new Dreamweaver Document window. 2 In DW4_HomeText.txt select the first two lines of text, “Fly Fishing” through “ravioli.” 3 Choose Edit > Copy to copy the text. 4 In the my_CompassHome document, click in the first layout cell in the textdescription layout table. 5 Choose Edit > Paste to paste the text into the layout cell. 6 In DW4_HomeText.txt select the next two lines of text, “Level 5 Rapids” through “Siberia.” 7 Choose Edit > Copy to copy the text. 8 In the my_CompassHome document, click in the second cell in the text description layout table. 9 Choose Edit > Paste to paste the text into the layout cell. 10 In DW4_HomeText.txt select the last two lines of text, “Puget Sound Kayaking” through “Puget Sound.” 11 Copy the text, then paste it in the third cell in the layout table. 12 Close DW4_HomeText.txt, then click in the my_CompassHome.html to make it the active document. Format text You can format text in the Document window by setting properties in the Property inspector. First, select the text you want to format, then apply the changes. You’ll change the font type and size of the text. 48 Chapter 1 1 If the Property inspector isn’t open, choose Window > Properties. 2 In the first text description layout cell, select all the text from the word “Fly,” through the last word “ravioli.” 3 In the Property inspector’s second Format pop-up menu, which currently reads Default Font, select Verdana, Arial, Helvetica, sans-serif. 4 In the Size pop-up menu, select 2. The text in your document automatically updates to reflect the changes. 5 Repeat the above steps to select and format the text in the other two textdescription layout cells. Apply color and style Now you’ll apply additional formatting changes to the text; you’ll apply color and style to create heading text. 1 In the first text description layout cell, select the heading text from the word “Fly,” through the word “Mountains.” 2 In the Property inspector, click the color picker; then move the eyedropper to the Learn More About image in the document window and select the brown color of the text in the image. 3 Still in the Property inspector, click the B icon to apply bold style to the text. 4 Repeat the above steps to apply color and style to the heading text in the other text description layout cells. 5 Press F12 to preview your page in a browser. Your page should look similar to the page below. Notice the text. There is little separation between text in one layout cell and the next. You’ll fix that in the upcoming tutorial steps. 6 Close the browser window, then click in the Document window to make it active. Dreamweaver Tutorial 49 Work in Standard view Layout view is helpful for laying out Web pages. Though you can adjust most of your design elements in Layout view, certain changes must be completed in Standard view. When you switch to Standard view, you’ll see how Dreamweaver uses tables to create your page structure. The Layout tables in Layout view are
This paragraph is controlled by the .Blue custom style and h1 HTML tag style.Except this sentence is controlled by the .Red style. Now we're back to the .Blue style.
Using the CSS Styles panel Use the CSS Styles panel to apply custom CSS styles to the current selection. The CSS Styles panel displays custom (class) CSS styles only; redefined HTML tags and CSS selector styles do not appear in the CSS Styles panel, because they are automatically applied to any text controlled by the specified tag or selector. (If you want to simply cut and paste reusable but not updatable and customizable styles, use the HTML Styles panel.) Choose Window > CSS Styles to display the CSS Styles panel. displays the tag of the current selection. Choose a tag from the pop-up menu to select a different tag. Apply opens the New Style dialog box. Create a new style for a particular document or create a new external style sheet. New Style Attach Style Sheet opens the Select Style Sheet File dialog box. Select an external style sheet to attach to your current document. Edit Style Sheet opens the Edit Style Sheet dialog box. Edit any of the styles in the current document or in an external style sheet. See also “Using CSS style sheets” on page 248. Note: Right-click (Windows) or Control-click (Macintosh) the CSS Styles panel to open a context menu that includes Edit, Duplicate, Delete, Apply New Style, Edit Style Sheet, and Attach Style Sheet commands. Inserting and Formatting Text 255 Setting CSS Styles preferences CSS Styles preferences control how Dreamweaver writes the code that defines CSS styles. CSS styles can be written in a shorthand form that some people find easier to work with. Some older versions of browsers do not correctly interpret the shorthand. Unless you want Dreamweaver to write styles in shorthand, there is no reason to change any of the CSS Style preferences. Choose Edit > Preferences and select CSS Styles to display CSS Styles Sheet Format preferences. See also “Using CSS style sheets” on page 248. Use Shorthand For determines which CSS style attributes Dreamweaver writes in shorthand. When Editing CSS Styles Use Shorthand controls whether Dreamweaver rewrites existing styles in shorthand. Choose If Original Used Shorthand to make Dreamweaver leave all styles as they are. Choose According to Settings Above to make Dreamweaver rewrite styles in shorthand according to the attributes specified in the Use Shorthand For checkboxes. Converting CSS styles to HTML tags If you have used CSS styles to specify text formatting (such as the family, size, color, and decoration of fonts) and later decide that you want to make the formatting viewable on a 3.0 browser, you can use the File > Convert > 3.0 Browser Compatible command to convert as much of the style information as possible to HTML tags. Note: Not all CSS styles can be converted to HTML, because HTML tags do not cover or support all the attributes possible in CSS. To convert a file that uses CSS styles to a 3.0 browser–compatible file: 1 Choose File > Convert > 3.0 Browser Compatible. 2 In the dialog box that appears, select CSS Styles to HTML Markup. When you choose the Layers to Tables option, Dreamweaver replaces all layers with a single table that preserves the original positioning. CSS styles are replaced, where possible, with HTML tags such as b and font. Any CSS markup that cannot be converted to HTML is removed. See “CSS to HTML markup conversion table” on page 257 for information on which styles are converted and which are removed. 3 Click OK. Dreamweaver opens the converted file in a new, untitled window. Note: You must perform this conversion procedure each time you change the original file in order to update the 3.0-compatible file. For this reason, it’s best to perform this procedure only after you are completely satisfied with your original file. 256 Chapter 10 CSS to HTML markup conversion table The CSS attributes listed in the following table are converted to HTML markup with the File > Convert > 3.0 Browser Compatible command. (See “Converting CSS styles to HTML tags” on page 256.) Attributes not listed in the table are removed. CSS attribute Converted to color FONT COLOR font-family FONT FACE font-size FONT SIZE="[1-7]" font-style: oblique I font-style: italic I font-weight B list-style-type: square UL TYPE="square" list-style-type: circle UL TYPE="circle" list-style-type: disc UL TYPE="disc" list-style-type: upper-roman OL TYPE="I" list-style-type: lower-roman OL TYPE="i" list-style-type: upper-alpha OL TYPE="A" list-style-type: lower-alpha OL TYPE="a" list-style UL or OL with TYPE as appropriate text-align P ALIGN or DIV ALIGN as appropriate text-decoration: underline U text-decoration: line-through STRIKE Inserting and Formatting Text 257 Checking spelling Use the Check Spelling command in the Text menu to check the spelling in the current document. The Check Spelling command ignores HTML tags and attribute values. By default, the spelling checker uses the U.S. English spelling dictionary. To change the dictionary, choose Edit > Preferences > General and select a different dictionary from the pop-up menu. Dictionaries for additional languages are available for downloading from the Dreamweaver Support Center. Running a spell check using the Check Spelling dialog box Use the following options in the Check Spelling dialog box to check the spelling in your document. (To display the dialog box, choose Text > Check Spelling.) Add to Personal adds the unrecognized word to your personal dictionary. To remove words from your personal dictionary, edit the Personal.dat file in a text editor. This file can be found in Dreamweaver 4/Configuration/ Dictionaries. Ignore ignores this instance of the unrecognized word. Ignore All ignores all instances of the unrecognized word. Change replaces this instance of the unrecognized word with text that you type in the Change To box or with the selection in the Suggestions list. Change All replaces all instances of the unrecognized word in the same manner. Searching and replacing text, tags, and attributes You can search the current document, selected files, a directory, or an entire site for text, text surrounded by specific tags, or HTML tags and attributes. Note that you use different commands to search for files, and to search for text and/or HTML 1 tags within files: Locate in Local Site and Locate in Remote Site search for files, while Edit > Find and Replace search for text and tags within files. To search for text and/or HTML within documents: 1 Choose from the following options: • In Design view, from the Document or Site window, choose Edit > Find and Replace. • While in Code view, right-click (Windows) or Control-click (Macintosh) and choose Find and Replace from the context menu. 258 Chapter 10 2 In the Find or Replace dialog box that appears, use the Find In option to specify which files to search: • Current Document confines the search to the active document. This option is available only when you choose Find or Replace with the Document window active, or from the context menu in the Code inspector. • Entire Local Site expands the search to all the HTML documents, library files, and text documents in the current site. After you choose Current Site, the name of the current site appears to the right of the pop-up menu. If this is not the site you want to search, choose a different site from the current site’s popup menu in the Site window. • Selected Files in Site confines the search to the files and folders that are currently selected in the Site window. This option is available only when you choose Find or Replace with the Site window active (that is, in front of the Document window). • Folder confines the search to a specific group of files. After choosing Folder, click the folder icon to browse to and select the directory you want to search. 3 Use the Search For option to specify the kind of search you want to perform. • Source Code lets you search for specific text strings in the HTML source code. See “About HTML source code searches” on page 260. • Text lets you search for specific text strings in the Document window. A text search ignores any HTML that interrupts the string. For example, a search for the black dog would match both the black dog and the black dog. • Text (Advanced) lets you search for specific text strings that are either within or not within a tag or tags. For example, in a document that contains the following HTML, searching for tries not inside i would find only the second instance of the word tries: John tries to get his work done on time, but he doesn’t always succeed. He tries very hard. See “Searching for text contained in specific tags” on page 262. • Specific Tag lets you search for specific tags, attributes, and attribute values, such as all td tags with valign set to top. See “Searching for HTML tags and attributes” on page 260. Note: Pressing Control+Enter or Shift+Enter (Windows), or Control+Return, Shift+Return, or Command+Return (Macintosh), adds line breaks within the text search fields, allowing you to search for a Return character. Be sure to deselect the Ignore Whitespace Differences option when performing this search, if you’re not using regular expressions. Note that this finds a Return character in particular, not simply the occurrence of a line break; for instance, it doesn’t find atag or a
tag. Return characters appear as spaces in the Design view, not as line breaks. Inserting and Formatting Text 259 4 Use the following options to expand or limit the search: • The Match Case option limits the search to text that exactly matches the case of the text you want to find. For example, if you search for the brown derby, you will not find The Brown Derby. Note: The Ignore Whitespace Differences option, when selected, treats all whitespace as a single space for the purposes of matching. For example, with this option selected, this text would match this text but not thistext. This option is not available when the Use Regular Expressions option is selected; you must explicitly write your regular expression to ignore whitespace. Note that
and
tags do not count as whitespace.
• The Use Regular Expressions option causes certain characters and short strings
(such as ?, *, \w, and \b) in your search string to be interpreted as regular expression
operators. For example, a search for the b\w*\b dog will match both the black
dog and the barking dog. See “About regular expressions” on page 264.
Note: If you are working in Code view and make changes to your document, and try to find
and replace anything other than source code, a dialog box appears letting you know that
Dreamweaver is synchronizing the two views before doing the search. For more information
on synchronizing views, see “Using the Code view (or Code inspector)” on page 330.
About HTML source code searches
Use the Source Code option in the Find or Replace dialog box to search for
specific text strings in the HTML source code. For example, a search for black dog
in the following code would produce two matches (in the alt attribute and in the
first sentence):
We saw several black dogs in the park yesterday. The black
dog we liked best was called Barnaby.
The phrase black dog also appears in the second sentence, but it does not match
because it is interrupted by a link.
See “Searching and replacing text, tags, and attributes” on page 258 for step-bystep instructions on initiating a search.
Searching for HTML tags and attributes
Use the Specific Tag option in the Find or Replace dialog box to search for specific
tags, attributes, and attribute values. For example, you can search for all img tags
with no alt attribute. See “Searching and replacing text, tags, and attributes” on
page 258 for information about the various types of searches.
260
Chapter 10
To perform a tag search:
1
Choose Edit > Find and Replace, and specify which files to search, as detailed
in “Searching and replacing text, tags, and attributes” on page 258.
2
Choose Specific Tag from the Search For pop-up menu.
3
Choose a specific tag from the pop-up menu next to Search For pop-up menu,
or choose [any tag].
If you only want to search for all occurrences of the specified tag, press the
Minus (-) button and skip to step 6. Otherwise, proceed with step 4.
4
Limit the search with one of the following tag modifiers:
• With Attribute chooses an attribute that must be in the tag for it to match. You
can specify a particular value for the attribute or choose [any value].
• Without Attribute chooses an attribute that cannot be in the tag for it to match.
For example, choose this option to search for all IMG tags with no ALT attribute.
• Containing specifies text or a tag that must be contained within the original tag
for it to match. For example, in the code heading
1, the font tag is contained within the b tag.
• Not Containing specifies text or a tag that cannot be contained within the
original tag for it to match.
• Inside Tag specifies a tag that the target tag must be inside of for it to match.
• Not Inside Tag specifies a tag that the target tag cannot be inside of for it to match.
5
Click the Plus (+) button and repeat step 4 to further limit the search.
6
Initiate the search:
• Click Find Next to highlight the next instance of the search text in the
current document.
• Click Find All to generate a list of all the instances of the search text in the
current document.
• Click Find Next to highlight the next instance of the search text in the current
document or if there is none, open the next document that contains the search text.
• Click Find All to generate a list of all the instances of the search text in the
current document or, if you are searching a directory or site, generate a list of
documents that contain the search text.
Inserting and Formatting Text
261
Searching for text contained in specific tags
Use the Text (Advanced) option in the Find or Replace dialog box to search for
specific text strings that are either within or not within a set of container tags. For
example, you can search for the word Untitled between
tag or a
tag. Return characters appear as spaces in the Document window, not as line breaks. Use parentheses to set off groupings within the regular expression to be referred to later; use $1, $2, $3, and so on (use ($) in the Find field and use the backslash (\) in the Replace field), to refer to the first, second, third, and later parenthetical groupings. For example, searching for (\d+)\/(\d+)\/(\d+) and replacing it with $2/ $1/$3 swaps the day and month in a date separated by slashes (to convert between American-style dates and European-style dates). 266 Chapter 10 11 CHAPTER 11 Inserting Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Three graphic file formats are generally used in Web pages—GIF, JPEG, and PNG. Currently, only GIF and JPEG file formats are fully supported by most browsers. Microsoft Internet Explorer (4.0 and later) and Netscape Navigator (4.04 and later) partially support the display of PNG images. Unless you are targeting your site to users with browsers that support the PNG format, use GIFs or JPEGs for broader appeal. GIF (Graphic Interchange Format) files use a maximum of 256 colors. GIFs are best for displaying noncontinuous-tone images or those with large areas of flat colors, such as navigation bars, buttons, icons, logos, or other images with uniform colors and tones. You can create GIFs with transparent backgrounds; interlaced GIFs, which slowly come into focus as an image loads in the browser; or animated GIFs, which are a number of GIFs saved as a single file. JPEG (Joint Photographic Experts Group) file format is the superior format for photographic or continuous-tone images, because JPEG files can contain millions of colors. JPEG files tend to be larger than GIF and PNG files. As the quality of a JPEG file increases, so does the file size and the file download time. You can often strike a good balance between the quality of the image and the file size by compressing the JPEG file. file format is a patent-free replacement for GIFs that includes support for indexed-color, grayscale, and true-color images, and alpha channel support for transparency. PNG is the native file format of Macromedia Fireworks. PNG files retain all the original layer, vector, color, and effects information (such as a drop shadow), and all elements are fully editable at all times. Files must have the .png file extension to be recognized as PNG files by Macromedia Dreamweaver. PNG (Portable Network Group) You can insert GIFs, JPEGs, and PNGs in Dreamweaver documents. In addition to inserting an image in a page, you can also insert an image in a table, in a form, or in a layer. 267 As you add images, you can select and modify them directly in the Document window. For example, you can use the Property inspector to add links to an image, add a border around an image, set an image’s size, add space around an image, and set the alignment. To create interactive graphics, such as rollover images, navigation bars, or image maps, use Dreamweaver behaviors. To set up an efficient production workflow, use the Dreamweaver Preferences dialog box to set a preferred image editor (such as Fireworks). Setting an image editor lets you launch the editor and edit an image while working in Dreamweaver. When using Fireworks as the preferred editor, you can make edits in Fireworks and with a single click automatically update the image in the Dreamweaver file. For more information, see “Using Dreamweaver and Fireworks Together” on page 281. In addition to inserting images in a page, you can set a page background image; see “Defining a background image or page color” on page 153. To overlap images, insert them in layers; see “Using Dynamic Layers” on page 407. Inserting an image When you insert an image into a Dreamweaver document, Dreamweaver automatically generates a reference to the file in the HTML source code. To ensure that this reference is correct, the image file must be in the current site. If it is not in the current site, Dreamweaver asks whether you want to copy the file to the root folder. To insert an image: 1 Do one of the following: • Place the insertion point where you want the image to appear in the Document window, and then choose Insert > Image or click the Insert Image button on the Common category of the Objects panel. • Place the insertion point where you want the image to appear in the Document window, and then press Control+Alt+I (Windows) or Command+Option+I (Macintosh). • Drag the Insert Image button from the Objects panel to the desired location in the Document window. • Drag an image from the Assets panel to the desired location in the Document window; then skip to step 3. • Drag an image from the Site Window to the desired location in the Document window; then skip to step 3. • Drag an image from the desktop to the desired location in the Document window; then skip to step 3. 268 Chapter 11 2 In the dialog box that appears, click Browse to choose a file, or type the path for the image file. If you are working in an unsaved document, Dreamweaver generates a file:// reference to the image file. When you save the document anywhere in the site, Dreamweaver converts the reference to a document-relative path. 3 Set image properties in the Property inspector. See “Setting image properties” on page 269. Setting image properties To set the following image properties, select an image in the Document window; then choose Window > Properties to display the Property inspector. The Property inspector initially displays the most commonly used properties. To see all properties, click the expander arrow in the lower right corner. Use the text field below the thumbnail image to set an image so you can refer to the image when using a Dreamweaver behavior (such as a Swap Image) or when using a scripting language such as JavaScript or VBScript. W and H reserve space for an image on a page as it loads in a browser. Dreamweaver automatically fills these fields with the image’s original size. Default and unlabeled values are pixels. You can also specify the following units: pc (picas), pt (points), in (inches), mm (millimeters), and cm (centimeters), and combinations thereof, such as 2in+5mm; Dreamweaver converts the values to pixels in the HTML source code. If you set W and H values that do not correspond to the actual width and height of the image, your image may not display properly in a browser. (To restore the original values, click the field labels.) You can change these values to scale the display size of this instance of the image, but this does not reduce download time, because the browser downloads all image data before scaling the image. To reduce download time and to ensure that all instances of an image appear at the same size, use an image-editing application to scale images. Src specifies the source file for the image. Click the folder icon to browse to the source file, or type the path. For information on entering paths, see “Absolute paths” on page 354. Inserting Images 269 Link specifies a hyperlink for the image. Drag the Point-to-File icon to a file in the Site window, click the folder icon to browse to a document on your site, or type manually the URL path. Align aligns an image and text on the same line. See “Aligning elements” on page 271. Alt specifies alternative text that appears in place of the image for text-only browsers or for browsers that have been set to download images manually. For visually impaired users who use speech synthesizers with text-only browsers, the text is spoken out loud. In some browsers, this text also appears when the pointer is over the image. Map Name Field enables you to create client-side image maps. See “Creating image maps” on page 273. V Space and H Space add space, in pixels, along the sides of the image. V Space adds space along the top and bottom of an image. H Space adds space along the left and right of an image. Target specifies the frame or window in which the linked page should load. (This option is not available when the image isn’t linked to another file.) The names of all the frames in the current document appear in the Target list. You can also choose from the following reserved target names: • • _blank • _self • _top loads the linked file into the full browser window, thereby removing all frames. loads the linked file into a new, unnamed browser window. loads the linked file into the parent frameset or window of the frame that contains the link. If the frame containing the link is not nested, the linked file loads into the full browser window. _parent loads the linked file into the same frame or window as the link. This target is the default, so you usually don’t need to specify it. Low Src specifies the image that should load before the main image. Many designers use a 2-bit (black and white) version of the main image because it loads quickly and gives visitors an idea of what they’re waiting to see. Border sets the width, in pixels, of a border around the image. Enter 0 for no border. You can apply a border to both linked and unlinked images. You set link color in the Page Properties dialog box. If you set a border for an image which has no links, the border will be the same color as text in the paragraph in which the image is inserted. Edit launches the image editor you specified in External Editors preferences and opens the selected image. When you save your image file and return to Dreamweaver, Dreamweaver updates the Document window with the edited image. See “Using an external image editor” on page 277. Reset Size resets 270 Chapter 11 the W and H values to the original size of the image. Aligning elements Use the image Property inspector to set the alignment of an image in relation to other elements in the same paragraph or line. HTML does not provide a way to wrap text around the contours of an image, as you can with some word processing applications. You can align an image to text, another image, a plugin, or other elements in the same line. You can also use the alignment buttons (left, right, and center) to set the horizontal alignment of an image. Browser Default generally specifies a baseline alignment. (The default may differ depending on the site visitor’s browser.) Baseline and Bottom align the baseline of the text (or other element) to the bottom of the selected object. Top aligns an image to the top of the tallest item (image or text) in the current line. Middle aligns the text baseline with the middle of the selected object. TextTop aligns the selected object with the top of the tallest character in the text line. Absolute Middle aligns to the absolute middle of the current line. Absolute Bottom aligns to the absolute bottom (which includes descenders, as in the letter g) with the bottom of the selected object. Left places the selected object on the left margin, wrapping text around it to the right. If left-aligned text precedes the object on the line, it generally forces leftaligned objects to wrap to a new line. Right places the object on the right margin, wrapping text around the object to the left. If right-aligned text precedes the object on the line, it generally forces right-aligned objects to wrap to a new line. Inserting Images 271 Resizing images and other elements You can visually resize elements such as images, plugins, Macromedia Shockwave or Flash movies, applets, and ActiveX controls in the Dreamweaver Document window. Visual resizing helps you determine how an element affects the layout at different dimensions. Resizing resets the width and height attributes of the element. The W and H fields in the Property inspector display the current width and height of the element as you resize it. The element’s file size does not change. Macromedia Flash movies and other vector-based elements are scalable and do not lose quality as you resize them. However, bitmap elements such as GIF, JPEG, and PNG images may become pixelated or distorted if you increase or decrease their width and height attributes. To maintain the same aspect ratio, hold down the Shift key while you resize a bitmap. However, it is recommended that you visually resize bitmaps in Dreamweaver only to determine the layout. Once you have determined the ideal size for your image, edit the file in an image-editing application. Editing the image may also reduce its file size and thus reduce download time. To resize an element: 1 Select the element (for example, an image or Shockwave movie) in the Document window. Resize handles appear at the bottom and right sides of the element and in the bottom right corner. If resize handles don’t appear, either click away from the element you want to resize and then reselect it, or click in the tag selector to select the element. 2 Resize the element by doing one of the following: • To adjust the width of the element, drag the selection handle on the right side. • To adjust the height of the element, drag the bottom selection handle. • To adjust the width and the height of the element at the same time, drag the corner selection handle. • To preserve the element’s proportions (its width-to-height ratio) as you adjust its dimensions, Shift-drag the corner selection handle. Elements can be visually resized to a minimum of 8 x 8 pixels. To adjust the width and height of an element to a smaller size (for example, 1 x 1 pixel), use the Property inspector to enter a numeric value. To return a resized element to its original dimensions, in the Property inspector, delete the values in the W and H fields, or click the Resize Size button. 272 Chapter 11 Creating image maps An image map is an image that has been divided into regions, or “hotspots”; when a hotspot is clicked an action occurs, for example a new file opens. Use the image Property inspector to graphically create and edit client-side image maps. Client-side image maps store the hyperlink information in the HTML document, not in a separate map file as do server-side image maps. When a site visitor clicks a hotspot in the image, the associated URL is sent directly to the server. This makes client-side image maps faster than server-side image maps, because the server does not need to interpret where the visitor clicked. Client-side image maps are supported by Navigator 2.0 and later, NCSA Mosaic 2.1 and 3.0, and all versions of Internet Explorer. Dreamweaver does not alter references to server-side image maps in existing documents; you can use both client-side image maps and server-side image maps in the same document. However, browsers that support both types of image maps give priority to client-side image maps. To include a server-side image map in a document, you must write the appropriate HTML code. To create a client-side image map: 1 Select the image. 2 Click the expander arrow in the lower right corner of the Property inspector to see all properties. 3 In the Map Name field, type a unique name for the image map. Note: If you are using multiple image maps in the same document, make sure each map has a unique name. 4 To define the image map areas, do one of the following: • Select the circle tool and drag the pointer over the image to create a circular hotspot. • Select the rectangle tool and drag the pointer over the image to create a rectangular hotspot. • Select the polygon tool and define an irregularly shaped hotspot by clicking once for each corner point. Click the arrow tool to close the shape. Once the hotspot is created, the hotspot Property inspector appears. (For information about the hotspot Property inspector, see “Setting hotspot properties” on page 274.) 5 In the hotspot Property inspector’s Link field, click the folder icon to browse to the file you want opened when the hotspot is clicked. Alternatively, type the file name. Inserting Images 273 6 To set where the linked file opens, type the name of the window in which the file should open in the Target field. Alternatively, choose a frame name from the Target pop-up menu. 7 In the Alt field, type the text you want to appear as alternative text in text-only browsers. Some browsers display this text as a tooltip when the user pauses the mouse pointer over the hotspot. 8 Repeat steps 4 through 7 to define additional hotspots in the image map. 9 When you’re finished mapping the image, click a blank area in the document to change the Property inspector. Setting hotspot properties The properties listed below appear in the Property inspector when a hotspot is selected. specifies the image map’s name. Create a unique name for each image map within a document. Map specifies the file or URL to be displayed when the user clicks the hotspot. If you are linking to a file from within the same site, enter a path that is relative to your document. (File names that begin with file:// are not relative). Link Target specifies the frame or window in which the linked page should load. The target option isn’t available until the selected hotspot contains a link. The names of all the frames in the current document appear in the list. If you specify a frame that doesn’t exist, when the document opens in a browser, the linked page loads into a new window that has the name you specified. You can also choose from the following reserved target names: • • _blank • _self • _top loads the linked file into the full browser window, thereby removing all frames. loads the linked file into a new, unnamed browser window. loads the linked file into the parent frameset or window of the frame that contains the link. If the frame containing the link is not nested, the linked file loads into the full browser window. _parent loads the linked file into the same frame or window as the link. This target is the default, so you usually don’t need to specify it. specifies alternative text that appears in place of the image for text-only browsers or for browsers that have been set to download images manually. Alt 274 Chapter 11 Modifying an image map You can easily edit the hotspots you create in an image map. You can move a hotspot area, resize hotspots, or move a hotspot forward or back in layer. You can also copy an image with hotspots from one document to another, or copy one or more hotspots from an image and paste them on another image; hotspots associated with the image are also copied to the new document. To select multiple hotspots in an image map: 1 Use the pointer hotspot tool to select a hotspot. 2 Do one of the following: • Shift-click the other hotspots you want to select. • Press Control+A (Windows) or Command+A (Macintosh) to select all of the hotspots. To move a hotspot: 1 Use the pointer hotspot tool to select the hotspot you want to move. 2 Do one of the following: • Drag the hotspot to a new area. • Use the Shift + arrow keys to move a hotspot by 10 pixels in the selected direction. • Use the arrow keys to move a hotspot by 1 pixel in the selected direction. To resize a hotspot: 1 Use the pointer hotspot tool to select the hotspot you want to resize. 2 Drag a hotspot selector handle to change the size or shape of the hotspot. Inserting Images 275 Creating a rollover image A rollover is an image that changes when the pointer moves across it. A rollover actually consists of two images: the primary image (the image displayed when the page first loads) and the rollover image (the image that appears when the pointer moves over the primary image). Both images in a rollover should be the same size; if the images are not the same size, Dreamweaver automatically resizes the second image to match the properties of the first image. Rollover images are automatically set to respond to the MouseOver event. For information about setting an image to respond to a different event (for example, a mouse click) or about editing a rollover image to display a different image, see “Swap Image” on page 467. A more complex form of rollover image is a navigation bar. To create a navigation bar, use the Insert > Interactive Images > Navigation Bar command; see “Inserting a navigation bar” on page 372. To create a rollover: 1 In the Document window, place the insertion point where you want the rollover to appear. 2 Insert the rollover by using one of these methods: • In the Objects panel’s Common category, click the Insert Rollover Image icon. • In the Objects panel’s Common category, drag the Insert Rollover Image icon to the desired location in the Document window. • Choose Insert > Interactive Images >Rollover Image. The Insert Rollover Image dialog box appears. 3 In the Image Name field, type a name for the rollover image. 4 In the Original Image field, click Browse and select the image or type the path of the image you want displayed when the page loads. 5 In the Rollover Image field, click Browse and select the image or type the path of the image you want displayed when the pointer rolls over the original image. 6 If you want the images preloaded in the browser’s cache so they load faster, select the Preload Images option. 7 In the When Clicked Go to URL field, click Browse and select the file, or type the path to the file you want to open when a user clicks the rollover image. Note: If you don’t set a link for the image, Dreamweaver inserts a null link (#) in the HTML source code to which the rollover behavior is attached. If you remove the null link, the rollover image will no longer work. 8 276 Chapter 11 Click OK to close the Insert Rollover Image dialog box. To test a rollover: 1 Choose File > Preview in Browser or press F12. 2 In the browser, move the pointer over the original image. The display should switch to the rollover image. Using an external image editor Dreamweaver makes it easy for you to design your HTML pages and work in an image editor to edit your graphics. While in Dreamweaver, you can open a selected image in an external image editor; when you return to Dreamweaver after saving the image file, any changes you made to the image are visible in the Document window. You can use Macromedia Fireworks as your external image editor. Fireworks 3 and Fireworks 4 use Design Notes to track where the original PNG file is stored on your local hard disk. Fireworks 2 doesn’t use Design Notes, but will prompt you to locate the original PNG file. Fireworks 1 automatically searches the folder that contains the selected file for a PNG file with the same name. For example, if you select an image whose source file is images/myPhoto.gif and the images folder also contains a file called myPhoto.png, Fireworks opens the PNG file. For more information, see “Using Dreamweaver and Fireworks Together” on page 281. If you set any other image-editing application as the external image editor and launch the editor from within Dreamweaver, the application launches and opens the selected image (for example, images/myPhoto.gif ). Use the image editor to modify the image, save your changes, and then view the updated changed image in Dreamweaver. If you prefer, you can manually open the original file from which the GIF was generated (for example, mylogo.png might be the original Fireworks file), make changes, and save the changed image. Dreamweaver still updates the image in the Document window when you return. If you don’t see an updated image after returning to the Dreamweaver window, select the image and then click the Refresh button in the Property inspector. Inserting Images 277 Setting external image editor preferences You can use the Dreamweaver preference dialog box to specify which image editor to launch to edit images with specific file extensions. For example, you can tell Dreamweaver to launch Fireworks when you want to edit a GIF, and to launch a different image editor when you want to edit a JPEG. You can set more than one external editor for a file extension; then, when you’re ready to edit the image, you can use the context menu to choose which editor to launch. 278 Chapter 11 To set an external image editor for an existing file type: 1 Open the File Types/Editor dialog box by doing one of the following: • Choose Edit > Preferences and select File Types/Editors. • Choose Edit > Edit with External Editor and select File Types/Editors. 2 In the Extensions list, select the file extension you want to set an external editor for. 3 Click the Add (+) button above the Editors list. 4 In the Select External Editor dialog box, browse to the application you want to launch as an editor for this file type. 5 In the Preferences dialog box, click Make Primary if you want this editor to be the primary editor for this file type. 6 If you want to set up an additional editor for this file type, repeat steps 3 and 4. Dreamweaver automatically uses the primary editor when you choose to edit this image type. You can choose the other listed editors from the context menu for the image in the Document window. To add a new file type to the Extensions list: 1 Open the File Types/Editor dialog box by doing one of the following: • Choose Edit > Preferences and select File Types/Editors. • Choose Edit > Edit with External Editor and select File Types/Editors. 2 Click the Add (+) button above the Extensions list. 3 Type the file name extension of the type of image you want to edit (for example, .JPEG). 4 To set an external editor, click the Add (+) button above the Editors list. 5 In the dialog box that appears, choose the application you want to use to edit this image type. 6 Click Make Primary if you want this editor to be the primary editor for the image type. To change an existing editor preference: 1 In External Editors preferences, click the file extension whose editor you want to change. 2 Use the Add (+) or Delete (–) buttons above the Editors list to add or remove an editor. For more information on the other options in External Editors preferences, see “Launching an external editor” on page 298. Inserting Images 279 Launching an external image editor You choose Edit > Preferences > File Types/Editor to set an external image editor for the image file types you specify. Once you’ve selected an external image editor, you can launch it and edit images while you work in your Dreamweaver document. To launch the external image editor, do one of the following: • Double-click the image you want to edit. • Right-click (Windows) or Control-click (Macintosh) the image you want to edit, the choose Edit With from the context menu to select an editor you previously defined, or choose Browse and select an editor. • Select the image you want to edit, and click Edit in the Property inspector. • Double-click the image file in the Site window to launch the primary image editor. If you haven’t specified an image editor, Dreamweaver launches the default editor for the file type. Note: When you open an image from the Site window, the Fireworks integration features described above are not in effect; Fireworks does not open the original PNG file. To use the Fireworks integration features, open images from within the Document window. Applying behaviors to images You can apply any available behavior to an image or image hotspot. When you apply a behavior to a hotspot, Dreamweaver inserts the HTML source code into the area tag. Three behaviors apply specifically to images: Preload Images, Swap Image, and Swap Image Restore. loads images that do not appear on the page right away (such as those that will be swapped in with timelines, behaviors, layers, or JavaScript) into the browser cache. This prevents delays caused by downloading when it is time for the images to appear. See “Preload Images” on page 459. Preload Images Swap Image swaps one image for another by changing the SRC attribute of the img tag. Use this action to create button rollovers and other image effects (including swapping more than one image at a time). See “Swap Image” on page 467. restores the last set of swapped images to their previous source files. This action is automatically added whenever you attach the Swap Image action to an object by default; you should never need to select it manually. See “Swap Image Restore” on page 468. Swap Image Restore You can also use behaviors to create more sophisticated navigation systems, such as a navigation bar or a jump menu. See “Creating navigation bars” on page 371 and “Creating jump menus” on page 369. 280 Chapter 11 12 CHAPTER 12 Using Dreamweaver and Fireworks Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unique integration features make it easy to work on files interchangeably in Macromedia Dreamweaver 4 and Macromedia Fireworks 4. Dreamweaver and Fireworks recognize and share many of the same file edits, including changes to links, image maps, table slices, and more. Together, the two applications provide a streamlined workflow for editing, optimizing, and placing Web graphics files in HTML pages. If you want to modify Fireworks images and tables placed in a Dreamweaver document, you can launch Fireworks to make edits, and then return to the updated document in Dreamweaver. If you want to make quick optimization edits to placed Fireworks images and animations, you can launch the Fireworks optimization dialog box and enter updated settings. In either case, updates are made to the placed files in Dreamweaver, as well as to the source Fireworks files, if those source files were launched. 281 Getting Fireworks files into Dreamweaver You can place Fireworks images and HTML code in Dreamweaver in a number of different ways. In Dreamweaver, you can use the insert features to place Fireworks files into documents. From Fireworks, you can export files directly to a Dreamweaver site folder, or you can copy and paste HTML code into a Dreamweaver document. Placing Fireworks images in Dreamweaver You can place Fireworks-generated GIF, JPEG, or PNG images directly in a Dreamweaver document. To insert a Fireworks image into a Dreamweaver document: 1 Place the insertion point where you want the image to appear in the Dreamweaver Document window. 2 Do one of the following: • Choose Insert > Image. • Click the Insert Image button in the Common category of the Objects panel. 3 Navigate to the desired Fireworks file, and click Open. If the Fireworks file is not in the current Dreamweaver site, a message appears, asking whether you want to copy the file to the root folder. Inserting Fireworks HTML code into Dreamweaver Dreamweaver lets you insert Fireworks-generated HTML code, complete with associated images, slices, and JavaScript, into a document. This insertion feature makes it easy for you to add tables or image maps created in Fireworks to a Dreamweaver document. To insert Fireworks HTML into a Dreamweaver document: 1 In Dreamweaver, save your document in a defined site. 2 Place the insertion point in the document where you want the inserted HTML code to begin. 3 Do one of the following: • Choose Insert > Interactive Images > Fireworks HTML. • Click the Insert Fireworks HTML button in the Common category of the Objects panel. 4 282 Chapter 12 In the dialog box that appears, click Browse to choose the desired Fireworks HTML file. 5 Select the Delete File After Insertion option to move the HTML file to the Recycle Bin (Windows) or Trash (Macintosh) when the operation is complete. Use this option if you no longer need the Fireworks HTML file after inserting it. This option does not affect the source PNG file associated with the HTML file. Note: If the HTML file is on a network drive, it is permanently deleted, not moved to the Recycle Bin or Trash. 6 Click OK to insert the HTML code, along with its associated images, slices, and JavaScript, into the Dreamweaver document. Copying and pasting Fireworks HTML into Dreamweaver A fast way to place Fireworks-generated images and tables in Dreamweaver involves copying and pasting Fireworks HTML code directly into a Dreamweaver document. To copy and paste Fireworks HTML into Dreamweaver: 1 In Fireworks, choose Edit > Copy HTML Code. 2 Follow the wizard as it guides you through the settings for exporting your HTML and images. When prompted, specify your Dreamweaver site folder as the destination for the exported images. The wizard exports the images to the specified destination and copies the HTML code to the Clipboard. 3 In Dreamweaver, place the insertion point in the document where you want to paste the HTML code, and choose Edit > Paste. All HTML and JavaScript code associated with the Fireworks files you exported is copied into the Dreamweaver document, and all links to images are updated. To export and paste Fireworks HTML into Dreamweaver: 1 In Fireworks, choose File > Export. 2 In the Export dialog box, specify your Dreamweaver site folder as the destination for the exported images. 3 Choose HTML and Images from the Save As pop-up menu. 4 Choose Copy to Clipboard from the HTML pop-up menu, and click Save. 5 In Dreamweaver, place the insertion point in the document where you want to paste the HTML code, and choose Edit > Paste. All HTML and JavaScript code associated with the Fireworks files you exported is copied into the Dreamweaver document, and all links to images are updated. Using Dreamweaver and Fireworks Together 283 Exporting Fireworks files to Dreamweaver The File > Export command in Fireworks lets you export and save optimized images and HTML files to a location inside the desired Dreamweaver site folder. You can then open the files for editing in Dreamweaver. Alternatively, you can export Fireworks files as Cascading Style Sheet (CSS) layers or Dreamweaver library items. Dreamweaver library items simplify the process of editing and updating a frequently used Web site component, such as a series of footer links or a navigation bar. A library item is a portion of an HTML file located in a folder named Library at your site root. You can drag copies of a library item to any page in your Web site. To export Fireworks images and HTML to Dreamweaver: 1 In Fireworks, choose File > Export. 2 Choose HTML and Images from the Save As pop-up menu. 3 Choose Export HTML File from the HTML pop-up menu. 4 Specify a destination folder inside your Dreamweaver site folder. 5 Click Save to export your files. To export Fireworks files as CSS layers: 284 Chapter 12 1 In Fireworks, choose File > Export. 2 Choose CSS Layers (.htm) from the Save As pop-up menu. 3 Specify a destination folder inside your Dreamweaver site folder. 4 Click Save to export your files. To export a Fireworks file as a Dreamweaver library item: 1 In Fireworks, choose File > Export. 2 Choose Dreamweaver Library (.lbi) from the Save As pop-up menu. 3 Name the file, and specify a destination folder named Library located at the Dreamweaver site root. If necessary, Fireworks prompts you to create this folder. 4 Click Save to export your file. Launching Fireworks from within Dreamweaver You can launch Fireworks directly from a Dreamweaver document by targeting a placed Fireworks image, table slice, or table for either editing or optimization. In order for these launch-and-edit features to work properly, you must designate Fireworks as the primary external image editor in Dreamweaver. Using Dreamweaver and Fireworks Together 285 Designating Fireworks as the primary external image editor for Dreamweaver Dreamweaver 4 provides preferences for automatically launching specific applications to edit specific file types. To use the Fireworks launch-and-edit features, make sure that Fireworks 4 is set as the primary editor for GIF, JPEG, and PNG files in Dreamweaver. Although you can use earlier versions of Fireworks as external image editors, these versions offer limited launch-and-edit capabilities. Fireworks 3 does not fully support the launch and edit of placed tables and slices within tables, while Fireworks 2 does not support the launch and edit of source PNG files for placed images. To set Fireworks 4 as the primary external image editor for Dreamweaver 4: 286 Chapter 12 1 In Dreamweaver, choose Edit > Preferences and select File Types/Editors. 2 In the Extensions list, select a Web file extension (.gif, .jpg, or .png). 3 In the Editors list, select Fireworks 4 and click Make Primary. 4 Repeat steps 2 and 3 to set Fireworks 4 as the primary editor for other Web file extensions. About Design Notes and source files Whenever you export a Fireworks file from a saved PNG source to a Dreamweaver site, Fireworks writes a Design Note that contains information about the file. For example, when you export a Fireworks table, Fireworks writes a Design Note for each exported slice file and for the HTML file that assembles the table slices. These Design Notes contain references to the source PNG file that spawned the exported files. When you launch and edit a Fireworks image from within Dreamweaver, Dreamweaver uses the Design Note to locate a source PNG for that file. For best results, always save your Fireworks source PNG file and exported files in a Dreamweaver site. This ensures that any user sharing the site will be able to locate the source PNG when launching Fireworks from within Dreamweaver. Specifying launch-and-edit preferences for Fireworks source files The Fireworks launch-and-edit preferences let you specify how to handle source PNG files when launching Fireworks files from another application, such as Macromedia Director or Dreamweaver. Dreamweaver recognizes the Fireworks launch-and-edit preferences only in certain cases where you launch and optimize a Fireworks image. Specifically, you must be launching and optimizing an image that is not part of a Fireworks table and that does not contain a correct Design-Note path to a source PNG file. In all other cases, including all launch-and-edit cases of Fireworks images, Dreamweaver automatically launches the source PNG file, prompting you to locate the source file if it cannot be found. To specify launch-and-edit preferences for Fireworks: 1 In Fireworks, choose Edit > Preferences, and click the Launch and Edit tab (Windows) or choose Launch and Edit from the pop-up menu (Macintosh). 2 Specify the preference options to use when editing or optimizing Fireworks images placed in an external application: Always Use Source PNG automatically launches the Fireworks PNG file that is defined in the Design Note as the source for the placed image. Updates are made to both the source PNG and its corresponding placed image. Never Use Source PNG automatically launches the placed Fireworks image, whether or not a source PNG file exists. Updates are made to the placed image only. lets you specify each time whether or not to launch the source PNG file. When you edit or optimize a placed image, Fireworks displays a message prompting you to make a launch-and-edit decision. You can also specify global launch-and-edit preferences from this message. Ask When Launching Using Dreamweaver and Fireworks Together 287 Editing Fireworks files placed in Dreamweaver Launch-and-edit integration lets you use Fireworks to edit Fireworks-generated images and tables placed in a Dreamweaver document. Dreamweaver automatically launches Fireworks, letting you make the desired Fireworks edits to the image. The updates you make in Fireworks are automatically applied to the placed image in Dreamweaver. Fireworks recognizes and preserves many edits made to the document in Dreamweaver, including changed links, edited image maps, and edited text in text slices. The Property inspector in Dreamweaver helps you identify Fireworksgenerated images, table slices, and tables in a document. Editing Fireworks images You can launch Fireworks to edit individual images placed in a Dreamweaver document. To launch and edit a Fireworks image placed in Dreamweaver: 1 In Dreamweaver, choose Window > Properties to open the Property inspector if needed. 2 Do one of the following: • Select the desired image. (The Property inspector identifies the selection as a Fireworks image and displays the name of the known PNG source file for the image.) Then click Edit in the Property inspector. • Hold down Control (Windows) or Command (Macintosh), and double-click the image you want to edit. • Right-click (Windows) or Control-click (Macintosh) the desired image, and choose Edit With Fireworks 4 from the context menu. Dreamweaver launches Fireworks, if it is not already open. 288 Chapter 12 3 If prompted, specify whether to launch a source Fireworks file for the placed image. 4 In Fireworks, edit the image. The document window indicates that you are modifying an image from Dreamweaver. Dreamweaver recognizes and preserves all edits applied to the image in Fireworks. 5 When you are finished making edits, click Done in the document window. Clicking Done exports the image using the current optimization settings for the source PNG file, updates the GIF or JPEG used by Dreamweaver, and saves the PNG source file if a source file was selected. Note: When you open an image from the Dreamweaver Site window, the Fireworks integration features described above are not in effect; Fireworks does not open the original PNG file. To use the Fireworks integration features, open images from within the Dreamweaver Document window. Editing Fireworks tables When you launch and edit an image slice that is part of a placed Fireworks table, Dreamweaver automatically launches the source PNG file for the entire table. To launch and edit a Fireworks table placed in Dreamweaver: 1 In Dreamweaver, choose Window > Properties to open the Property inspector if needed. 2 Do one of the following: • Click inside the table, and click the TABLE tag in the status bar to select the entire table. (The Property inspector identifies the selection as a Fireworks table and displays the name of the known PNG source file for the table.) Then click Edit in the Property inspector. • Click the top left corner of the table to select it, and then click Edit in the Property inspector. • Select the desired table slice, and click Edit in the Property inspector. • Hold down Control (Windows) or Command (Macintosh), and double-click the image you want to edit. • Right-click (Windows) or Control-click (Macintosh) the desired table slice, and choose Edit With Fireworks 4 from the context menu. Dreamweaver launches Fireworks, if it is not already open. The source PNG file for the entire table appears in the document window. 3 In Fireworks, edit the table image. Dreamweaver recognizes and preserves all edits applied to the image in Fireworks. Using Dreamweaver and Fireworks Together 289 4 When you are finished making edits, click Done in the document window. Clicking Done exports HTML and image slice files for the table using the current optimization settings, updates the table placed in Dreamweaver, and saves the PNG source file. Fireworks exports and replaces only those HTML and image slice files that are needed to update the table in Dreamweaver. Optimizing Fireworks images and animations placed in Dreamweaver You can launch Fireworks from Dreamweaver to make quick export changes, such as resampling or changing the file type, to placed Fireworks images and animations. Fireworks lets you make changes to optimization settings, animation settings, and the size and area of the exported image. To change optimization settings for a Fireworks image placed in Dreamweaver: 1 In Dreamweaver, select the desired image and choose Commands > Optimize Image in Fireworks. 2 If prompted, specify whether to launch a source Fireworks file for the placed image. 3 In Fireworks, make the desired edits in the optimization dialog box: • To edit optimization settings, click the Options tab. For more information, see Using Fireworks. • To edit the size and area of the exported image, click the File tab. For more information, see “Resizing placed Fireworks images” on page 291. • To edit animation settings for the image, click the Animation tab. For more information, see “Editing placed Fireworks animations” on page 292. 290 Chapter 12 4 When you are finished editing the image, click Update. Clicking Update exports the image using the new optimization settings, updates the GIF or JPEG placed in Dreamweaver, and saves the PNG source file if a source file was selected. If you changed the format of the image, the Dreamweaver link checker prompts you to update references to the image. For example, if you changed the format of an image called my_image from GIF to JPEG, clicking OK at this prompt changes all references to my_image.gif in your site to my_image.jpg. Resizing placed Fireworks images When launching and optimizing a Fireworks image from Dreamweaver, you can resize the image and select a specific image area to be exported. To specify exported image dimensions: 1 In Fireworks, in the optimization dialog box, click the File tab. 2 To scale the image as it is exported, specify a scale percentage or enter the desired width and height in pixels. Select Constrain to scale the width and height proportionally. 3 To export a selected area of the image, select the Export Area option and specify the export area: • Drag the dotted border that appears around the preview until it encloses the desired export area. (Drag inside the preview to move hidden areas into view.) • Enter pixel coordinates for the boundaries of the export area. Using Dreamweaver and Fireworks Together 291 Editing placed Fireworks animations If you are launching and optimizing a placed Fireworks animation, you can also edit the animation settings. The animation options in the optimization dialog box are similar to those available in the Fireworks Frames panel. To edit an animated image: 1 In Fireworks, in the optimization dialog box, click the Animation tab. 2 Use the following techniques to preview animation frames at any time: • To display a single frame, select the desired frame in the list on the left side of the dialog box, or use the frame controls in the lower right area of the dialog box. • To play the animation, click the Play/Stop control in the lower right area of the dialog box. 3 Make edits to the animation: • To specify the frame disposal method, select the desired frame in the list and choose an option from the pop-up menu (indicated by the trash icon). • To set the frame delay, select the desired frame in the list and enter the delay time in hundredths of a second. • To set the animation to play repeatedly, click the Looping button and choose the desired number of repetitions from the pop-up menu. • Select the Auto-Crop option to crop each frame as a rectangular area, so that only the image area that differs between frames is output. Selecting this option reduces file size. • Select the Auto-Difference option to output only pixels that change between frames. Selecting this option reduces file size. 292 Chapter 12 Updating Fireworks HTML placed in Dreamweaver The File > Update HTML command in Fireworks provides an alternative to the launch-and-edit technique for updating Fireworks files placed in Dreamweaver. With Update HTML, you can edit a source PNG image in Fireworks and then automatically update any exported HTML code and image files placed in a Dreamweaver document. This command lets you update Dreamweaver files even when Dreamweaver is not running. To update Fireworks HTML placed in Dreamweaver: 1 In Fireworks, choose File > Update HTML. 2 Navigate to the Dreamweaver file containing the HTML you wish to update, and click Open. 3 Navigate to the folder destination where you want to place the updated image files, and click Choose. Fireworks updates the HTML and JavaScript code in the Dreamweaver document. Fireworks also exports updated images associated with the HTML and places the images in the specified destination folder. If Fireworks cannot find matching HTML code to update, it gives you the option of inserting new HTML code into the Dreamweaver document. Fireworks places the JavaScript section of the new code at the beginning of the document and places the HTML table or link to the image at the end. Creating Web photo albums The Create Web Photo Album command in Dreamweaver lets you automatically generate a Web site that showcases an album of images from a given folder. This command uses JavaScript to call Fireworks, which creates a thumbnail and a larger-sized image for each of the images in the folder. Dreamweaver then creates a Web page containing all the thumbnails, as well as links to the larger images. To use the Create Web Photo Album, you must have both Dreamweaver and Fireworks installed on your system. Before you begin, place all of the images for your photo album in a single folder. (The folder is not required to be in a site.) In addition, make sure that the image file names end in extensions recognized by the Create Web Photo Album command (.gif, .jpg, .jpeg, .png, .psd, .tif, or .tiff ). Images with unrecognized file extensions are not included in the photo album. Using Dreamweaver and Fireworks Together 293 To create a Web photo album: 1 In Dreamweaver, choose Commands > Create Web Photo Album. 2 In the Photo Album Title text field, enter a title. The title will be displayed in a gray rectangle at the top of the page containing the thumbnails. If desired, you may enter up to two lines of additional text to appear directly beneath the title, in the Subheading Info and Other Info text fields. 3 Choose the folder containing source images by clicking the Browse button next to the Source Images Folder text field. Then choose (or create) a destination folder in which to place all the exported images and HTML files by clicking the Browse button next to the Destination Folder text field. The destination folder should not already contain a photo album; if it does, and if any new images have the same names as previously used images, you may overwrite existing thumbnail and image files. 4 Specify display options for the thumbnail images: • Choose a size for the thumbnail images from the Thumbnail Size pop-up menu. Images are scaled proportionally to create thumbnails that fit within a square that has the indicated pixel dimensions. • To display the file name of each original image below the corresponding thumbnail, select Show Filenames. • Enter the number of columns for the table that displays the thumbnails. 5 Choose a format for the thumbnail images from the Thumbnail Format pop-up menu: GIF WebSnap 128 creates GIF thumbnails that use a Web adaptive palette of up to 128 colors. GIF WebSnap 256 creates GIF thumbnails that use a Web adaptive palette of up to 256 colors. JPEG - Better Quality creates JPEG thumbnails with relatively higher quality and larger file sizes. JPEG - Smaller File creates JPEG thumbnails with relatively lower quality and smaller file sizes. 6 Choose a format for the large-size images from the Photo Format pop-up menu. A large-size image of the specified format is created for each of your original images. You may specify a format for the large-size images that differs from the format you specified for the thumbnails. Note: The Create Web Photo Album command does not let you use your original image files as the large-size images, because original image formats other than GIF and JPEG might not display properly on all browsers. Note that if your original images are JPEG files, the large-size images generated may have larger file sizes or lower quality than the original files. 294 Chapter 12 7 Choose a Scale percentage for the large-size images. Setting Scale to 100% creates large-size images the same size as the originals. Note that the scale percentage is applied to all of the images; if your original images aren’t all the same size, scaling them by the same percentage may not produce the desired results. 8 Select Create Navigation Page for Each Photo to create an individual Web page for each source image, containing navigation links labeled Back, Home, and Next. If you select this option, the thumbnails link to the navigation pages. If you don’t select this option, the thumbnails link directly to the large-size images. 9 Click OK to create the HTML and image files for the Web photo album. Fireworks launches (if it’s not already running) and creates the thumbnails and large-size images. This may take several minutes if you’ve included a large number of image files. When the processing is complete, Dreamweaver becomes active again, and creates the page containing the thumbnails. 10 When a dialog appears that says “Album Created,” click OK. You may have to wait a few seconds for your photo album page to appear. The thumbnails are shown in alphabetical order by file name. Note: Clicking the Cancel button in the Dreamweaver dialog box after processing has begun does not stop the process of creating the photo album; it merely prevents Dreamweaver from displaying the main photo album page. Using Dreamweaver and Fireworks Together 295 296 Chapter 12 13 CHAPTER 13 Inserting Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Macromedia Dreamweaver lets you add sound and movies to your Web site quickly and easily. You can incorporate and edit multimedia files and objects, such as Java applets; QuickTime, Flash, and Shockwave movies; and MP3 audio files. You can also attach Design Notes to these objects. And now you can insert Flash button and text objects from within Dreamweaver itself. Inserting media objects You can insert a Java applet, QuickTime or Shockwave movie, Flash movie or object, ActiveX control, or other audio or video objects in a page. To insert a media object in a page, do one of the following: • Place the insertion point where you want to insert the object, and click the appropriate button on the Objects panel. Shockwave, ActiveX and Flash objects have defined buttons. Use the Netscape Navigator plugin button to insert QuickTime movies and audio files. For more information, see “Inserting Netscape Navigator plugin content” on page 313. • Drag the appropriate button from the Objects panel to the place you want the object to appear in the Document window. • Place the insertion point in the Document window where you want to insert the object, then choose the appropriate object from the Insert > Media or Insert > Interactive Images submenu. 297 In most cases, a dialog box appears letting you select a source file and specify certain parameters for the media object. Tip: To prevent such dialog boxes from appearing, choose Edit > Preferences > General and deselect the Show Dialog When Inserting Objects option. To override whatever preference is set for showing dialog boxes, hold down the Control (Windows) or Option (Macintosh) key while inserting the object. (For example, to insert a placeholder for a Shockwave movie without specifying the file, hold down Control or Option and click the Shockwave button.) Each Objects panel button inserts the necessary HTML source code to make the object or placeholder appear on the page. To specify a source file, set dimensions and other parameters and attributes, use the Property inspector for each object. Launching an external editor You can double-click most files in the Site window to edit them directly. If the file is an HTML file, it opens in Dreamweaver. If it’s another kind of file, such as an image file, it opens in an appropriate external editor, such as Macromedia Fireworks. Each file type that Dreamweaver doesn’t handle directly can be associated with one or more external editors found on your system. The editor that launches when you double-click the file in the Site window is called the primary editor. You can set which editor is associated with a file type in File Types/Editors preferences. If more than one editor is associated with the file type, you can launch a secondary editor for a particular file: right-click (Windows) or Control-click (Macintosh) the file name in the Site window, and choose an editor from the Open With submenu of the context menu. Most of the time, the primary editor is the same application that would be launched if you double-clicked the file’s icon on the desktop. To explicitly specify which external editors should be launched for a given file type, choose Edit > Preferences and select File Types/Editors from the Category list. File name extensions, such as .gif, .wav, and .mpg, are listed on the left under Extensions. Associated editors for a selected extension are listed on the right under Editors. You can also browse to find an external editor to edit your file. Right-click (Windows) or Control-click (Macintosh) the file in the Design view of the Document window, and choose Edit With > Browse or select the file and choose > Edit > Edit with External Editor. 298 Chapter 13 To add a file type to the list of extensions in File Types/Editors preferences: 1 Click the Plus (+) button above the Extensions list. 2 Enter a file type extension (including the period at the beginning of the extension), or several related extensions separated by spaces. For example, you might enter .png .jpg. To add an editor for a given file type: 1 Select the file type extension in the Extensions list. 2 Click the Plus (+) button above the Editors list. 3 In the dialog box that appears, choose an application to add to the Editors list. For example, choose the application icon for Excel to add that application to your Editors list. To remove a file type from the list: 1 Select the file type in the Extensions list. Note: You can’t undo after removing a file type, so be sure you want to remove it. 2 Click the Minus (-) button above the Extensions list. To make an editor the primary editor for a file type: 1 Select the file type. 2 Select the editor (or add it if it isn’t on the list). 3 Click the Make Primary button. To dissociate one editor from a file type: 1 Select the file type in the Extensions list. 2 Select the editor in the Editors list. 3 Click the Minus (-) button above the Editors list. Inserting Media 299 Using Design Notes with media objects As with other objects in Dreamweaver, you can add Design Notes to a media object. To add Design Notes to a media object: 1 Right-click (Windows) or Control-click (Macintosh) the object in the Document window. Note: You must define your site before adding Design Notes to any object. See “About Design Notes” on page 134. 2 Choose Design Notes from the context menu. 3 Enter the information you want in the Design Note. You can also add a Design Note to a media object from the Site window by selecting the file, revealing the context menu, and choosing Design Notes from the context menu. For details, see “About Design Notes” on page 134. About Flash content Macromedia Flash technology is the premier solution for the delivery of vectorbased graphics and animations. Flash Player is available as both a Netscape Navigator plugin and an ActiveX control for Microsoft Internet Explorer on the PC, and it is incorporated in the latest versions of Netscape Navigator, Microsoft Windows, and America Online. Before you use the Flash commands available in Dreamweaver, you may want to review the three different Flash file types. The Flash file (.fla) is the source file for any project and is created in the Flash program. This type of file can only be opened in Flash, not in Dreamweaver or in browsers. You can open the Flash file in Flash, then export it as an SWF or SWT file to use in browsers. For more information, see “Using Flash button objects” on page 301 and “Creating new button templates” on page 306. The Flash movie file (.swf) is a compressed version of the Flash (.fla) file, optimized for viewing on the Web. This file can be played back in browsers and previewed in Dreamweaver, but cannot be edited in Flash. This is the type of file you create when using the Flash button and text objects. For more information, see “Using Flash button objects” on page 301 and “Using Flash text objects” on page 304. The Flash Generator template (.swt) files enable you to modify and replace information in a Flash movie file. These files are used in the Flash button object, which lets you modify the template with your own text or links, to create a custom SWF to insert in your document. In Dreamweaver, these template files can be found in the Dreamweaver/Configuration/Flash Objects/Flash Buttons and Flash Text folders. 300 Chapter 13 If you use Flash to design your own Generator template files (see “Creating new button templates” on page 306), you can distribute these templates to members of your Web design team. They in turn can save these files to the Configuration/ Flash Objects/Flash Buttons folder, then access these templates using the Flash button object. Using Flash button objects The Flash button object lets you customize and insert a set of predesigned Flash buttons. Note: You must save your document before inserting a Flash button or text object. Inserting Media 301 To insert a Flash button object: 1 While in the Design view of the Document window, select Insert Flash Button from the Objects panel or choose Insert > Interactive Images > Flash Button. You can also drag the Flash button icon over to the Document window. The Insert Flash Button dialog box appears. 2 Select the button style you want from the Style list. You’ll see an example of the button in the Sample field. You can click this sample to see how it functions in the browser. However, the Sample field does automatically update to show the changes to text or font that you might make. These changes will appear in Design view. 3 In the Button Text field (optional), type the text you want to appear. For example, type Press me! This field only accepts changes if the selected button has a {Button Text} parameter defined. This is shown in the Sample field. The text you type in replaces the {Button Text} when you preview the file. 4 In the Font field, specify a font size and select the font you want from the pop-up menu. You only need to make font and size selections if your button has text parameters defined. If the default font for a button is not available on your system, select another font from the pop-up menu. Keep in mind that you will not see the font you selected in the Sample field, but you can click Apply to insert the button in the page to see a what the text will look like. 5 In the Link field (optional), enter a document-relative or absolute link for the button. Site-relative links are not accepted because browsers don’t recognize them within Flash movies. If you use a document-relative link, be sure to save the SWF file to the same directory as the HTML file. (Browsers vary in their interpretation of document-relative links and saving to the same directory ensures that the links will work correctly.) 6 In the Target field (optional), specify a target frame or target window for the Flash button’s link to go to. 7 In the Bg Color field (optional), set the background color for the Flash movie. Use the color picker or type in a Web hexadecimal value (such as #FFFFFF). 8 In the Save As field, enter a file name to save the new SWF file. You can use the default file name (for example, button1.swf ), or type in a new name. If the file contains a document-relative link, you must save the file to the same directory as the current HTML document to maintain document-relative links. 302 Chapter 13 9 Click Get More Styles to go the Macromedia Exchange site and download more button styles. For more information, see “Adding extensions to Dreamweaver” on page 93. 10 Click Apply or OK to insert the Flash button in the Document window. Tip: Select Apply to see changes in Design view, while keeping the dialog box open—this way you can continue making changes to the button. To modify a Flash button object: 1 While in Design view, select the Flash button object. 2 The Property inspector displays the Flash button properties. You can make some changes in the Property inspector. These changes just modify HTML attributes like width, height, and Bg color. 3 To make changes to content, display the Insert Flash Button dialog box by using one of the following methods: • Double-click the Flash button object. • Click Edit in the Property inspector. • Right-click (Windows) or Control-click (Macintosh) and choose Edit from the context menu. 4 In the Insert Flash Button dialog box, make your edits in the fields described in the previous procedure. In the Design view, you can resize the object easily by using the resizing handles. You can return the object to its original size by selecting Reset Size on the Property inspector. See “Resizing images and other elements” on page 272. To see the Flash button object play in the Document window: 1 While in Design view, select the Flash button object. 2 In the Property inspector, click the green Play button. 3 Click the red Stop button to end the preview. Note: You can’t edit the Flash button object while it is playing. It’s also always a good idea to preview your document in the browser to see exactly how the Flash button looks in the browser. Inserting Media 303 Using Flash text objects The Flash text object lets you create and insert a Flash movie that contains just text. This allows you to create a small, vector-graphic movie with the designer fonts and the text of your choice. To insert a Flash text object: 1 With the Document window in Design view, select Insert Flash Text from the Objects panel or choose Insert > Interactive Images > Flash Text. The Insert Flash Text dialog box appears. 2 Select a font from the Font pop-up menu. This menu lists all TrueType fonts currently loaded on your system. 3 Enter a font size in the Size field; these are point sizes. 4 Specify style attributes like bold or italic, and text alignment by clicking the appropriate style buttons. 5 In the Color field, set the color of the text by using the color picker or entering a Web hexadecimal value (such as #FFFFFF). 6 In the Rollover Color field, set the color that appears when the pointer rolls over the Flash text object. Use the color picker or enter a Web hexadecimal value (such as #FFFFFF). 7 Enter the text you want in the Text field. To see the font style displayed in the Text field, select Show Font. 304 Chapter 13 8 If you want to associate a link with the Flash text object, enter a documentrelative or absolute link in the Link field. Site-relative links are not accepted because browsers don’t recognize them within Flash movies. If you use a document-relative link, be sure to save the SWF file to the same directory as the HTML file. (Browsers vary in their interpretation of document-relative links and saving to the same directory ensures that the links will work correctly.) 9 If you entered a link, you can specify a target frame or target window for that link to go to in the Target field. 10 In the Bg Color field, choose a background color for the text. Use the color picker or enter a Web hexadecimal value (such as #FFFFFF). 11 In the Save As field, enter a name for the file. You can use the default file name (for example, tex1.swf ), or type in a new name. If the file contains a document-relative link, you must save the file to the same directory as the current HTML document to maintain document-relative links. 12 Click Apply or OK to insert the Flash text in the Document window. If you click Apply, the dialog box remains open, and you can preview the text in your document. To modify or play the Flash text object, use the same procedure as you would for a Flash button. See “Using Flash button objects” on page 301. Setting Flash object properties The Property inspector for Flash objects initially displays the most commonly used properties. Click the expander arrow in the lower right corner to see more properties. The Property inspector also contains a Play button that lets you preview the Flash object in the Document window. When you click the green Play button, you’ll see what the object will look like in a browser. Name specifies the name to identify the button for scripting. Enter a name in the unlabeled field on the far left side of the Property inspector. W and H specify the width and height of the object in pixels. You can also specify the following units: pc (picas), pt (points), in (inches), mm (millimeters), cm (centimeters), or % (percentage of the parent object’s width or height). The abbreviations must follow the value without a space: for example, 3mm. File specifies the path to the Flash object file. Click the folder icon to browse to a file, or type a path. Align determines how the object is aligned on the page. For a description of each option, see “Aligning elements” on page 271. Inserting Media 305 Bg specifies Edit a background color for the object. accesses the Flash object dialog box. Reset Size resets the selected button to the original movie size. Play/Stop lets you preview the Flash object in the Document window. Click the green Play button to see the object in Play mode; click the red Stop button to stop the movie and be able to edit the object. ID defines the optional ActiveX ID parameter. This parameter is most often used to pass information between ActiveX controls. V Space and H Space specify the number of pixels of white space above, below, and on both sides of the button. Quality sets the quality parameter for the object and embed tags that define the button. A movie looks better with a high setting, but it requires a faster processor to render correctly on the screen. Low emphasizes speed over appearance, whereas High favors appearance over speed. Auto Low emphasizes speed to begin with, but improves appearance when possible. Auto High emphasizes both qualities at first, but sacrifices appearance for speed if necessary. Scale sets the scale parameter for the object and embed tags that defines the button or text object. This parameter defines how the movie displays within the area defined for the movie by the width and height values. The choices are Default (Show All), No Border, and Exact Fit. Show All makes the entire movie visible in the specified area, maintaining the aspect ratio of the movie and preventing distortion; borders may appear on two sides of the movie. No Border is similar to Show All, except portions of the movie may be cropped. With Exact Fit, the entire movie fills the specified area, but the aspect ratio of the movie is not maintained and distortion may occur. Parameters opens a dialog box for entering additional parameters. See “Using parameters” on page 319. Creating new button templates Use Flash together with the free Generator authoring templates to create new button templates, complete with Generator Text objects. You can also download new button templates from the Macromedia Exchange for Dreamweaver Web site and place them in your Flash Button folder. For more information on creating new button templates, see the article on that topic found on the Macromedia Web site at http://www.macromedia.com/support/dreamweaver/insert_media.html. For more information on the using extensions, see “Adding extensions to Dreamweaver” on page 93. 306 Chapter 13 Inserting Flash movies When you insert a Flash movie into a document, Dreamweaver uses both the object tag (defined by Internet Explorer for ActiveX controls) and the embed tag (defined by Netscape Navigator) to get the best results in all browsers. When you make changes in the Property inspector for the movie, Dreamweaver maps your entries to the appropriate parameters for both the object and embed tags. Note: If you insert a movie using the Flash movie object, it inserts a codebase parameter that instructs Internet Explorer for Windows to automatically download the necessary (Flash 4 and later) ActiveX control. If you don’t want this to happen, you can change the attribute. To insert a and preview a Flash movie: 1 In the Design view of the Document window, place the insertion point where you want to insert the movie. 2 Insert the movie in one of the following ways: • Click the Insert Flash icon in the Objects panel. • Choose Insert > Media > Flash. • Drag the Insert Flash icon from the Objects panel to the insertion point in your document. 3 In the dialog box that appears, select a Flash movie file (.swf ). A Flash placeholder appears in the Document window (unlike Flash button and text objects). 4 To see a preview of the Flash movie in the Document window, click the Green play button in the Property inspector. Click Stop to end the preview. You can also preview the Flash movie in a browser by pressing F12. Tip: To preview all Flash content in a page, press Control+Alt+Shift+P (Windows) or Shift+Option+Command+P (Macintosh). All Flash objects and movies are set to Play. Inserting Media 307 Setting Flash movie properties To view the following properties in the Property inspector, select a Flash movie. The Property inspector initially displays the most commonly used properties. To see all properties, click the expander arrow in the lower right corner. Name specifies a name to identify the movie for scripting. Enter a name in the unlabeled field on the far left side of the Property inspector. W and H specify the width and height of the movie in pixels. You can also specify the following units: pc (picas), pt (points), in (inches), mm (millimeters), cm (centimeters), or % (percentage of the parent object’s value). The abbreviations must follow the value without a space: for example, 3mm. File specifies the path to the Flash movie file. Click the folder icon to browse to a file, or type a path. Align determines how the movie is aligned on the page. For a description of each option, see “Aligning elements” on page 271. Bg specifies a background color for the movie area. This color also appears while the movie is not playing (while loading and after playing). ID defines the optional ActiveX ID parameter. This parameter is most often used to pass information between ActiveX controls. V Space and H Space specify the number of pixels of white space above, below, and on both sides of the movie. Parameters opens a dialog box for entering additional parameters to pass to the movie. See “Using parameters” on page 319. The movie must have been designed to receive these additional parameters. Quality sets the quality parameter for the object and embed tags that run the movie. The settings relate to the level of anti-aliasing used during playback of the movie. A movie looks better with a high setting, but it requires a faster processor to render correctly on the screen. Low emphasizes speed over appearance, whereas High favors appearance over speed. Auto Low emphasizes speed to begin with, but improves appearance when possible. Auto High emphasizes both qualities at first, but sacrifices appearance for speed if necessary. Scale sets the scale parameter for the object and embed tags that run the movie. For more information, see “Setting Flash object properties” on page 305. Autoplay plays Loop makes the movie automatically when the page loads. the movie loop indefinitely. Reset Size returns 308 Chapter 13 the selected movie to its original size. Inserting Generator objects Macromedia Generator provides a way to serve dynamic Web content. You can create Generator files with Flash 4 or 5 using free Generator authoring templates; the files are then served by a Web server running Generator server software. You can insert a Generator object into a Dreamweaver document. To insert a Generator object: 1 In the Document window, place the insertion point where you want to insert the object. 2 Click the Generator button in the Objects panel. 3 In the dialog box that appears, select a Generator template (.swt) file. 4 If desired, click the Plus (+) button to add a name=value parameter pair. Then enter a name for the parameter in the Name field, and a value for the parameter in the Value field. Repeat this step for each parameter. 5 To remove a parameter, select it in the Parameters list and click the Minus (–) button. 6 When you finish entering parameters, click OK to insert the Generator object. To edit the parameters after the Generator object has been inserted, use the Code inspector or the Code view of the Document window. The name=value pairs are used by the Generator server, in conjunction with other data sources, to dynamically create the Flash movie or image file. Inserting Media 309 About Shockwave movies Shockwave, the Macromedia standard for interactive multimedia on the Web, is a compressed format that allows media files created in Macromedia Director to be downloaded quickly and played by most popular browsers. Inserting Shockwave movies The software that plays Shockwave movies is available as both a Netscape Navigator plugin and an ActiveX control. When you insert a Shockwave movie, Dreamweaver uses both the object tag (for the ActiveX control) and the embed tag (for the plugin) to get the best results in all browsers. When you make changes in the Property inspector for the movie, Dreamweaver maps your entries to the appropriate parameters for both the object and embed tags. To insert a Shockwave movie: 1 In the Design view of Document window, place the insertion point where you want to insert a Shockwave movie. 2 Click the Shockwave button on the Objects panel, or choose Insert > Media > Shockwave or drag the Shockwave button over to your document. 3 In the dialog box that appears, select a movie file. 4 In the Property inspector, enter the width and height of the movie in the W and H boxes. Setting Shockwave properties To ensure the best results in both Microsoft Internet Explorer and Netscape Navigator, Dreamweaver inserts Shockwave movies using both the object and embed tags. (object is the tag defined by Microsoft for ActiveX controls; embed is the tag defined by Navigator for plugins.) To view the properties in the Property inspector, select a Shockwave movie. The Property inspector initially displays the most commonly used properties. Click the expander arrow in the lower right corner to see all properties. Name specifies a name to identify the movie for scripting. Enter a name in the unlabeled field on the far left side of the Property inspector. W and H specify the width and height of the movie in pixels. You can also specify the following units: pc (picas), pt (points), in (inches), mm (millimeters), cm (centimeters), or % (percentage of the parent object’s width or height). The abbreviations must follow the value without a space: for example, 3mm. File specifies the path to the Shockwave movie file. Click the folder icon to browse, or type a path to the file. 310 Chapter 13 Align determines how the movie is aligned on the page. For a description of each option, see “Aligning elements” on page 271. Bg specifies a background color for the movie area. This color also appears while the movie is not playing (while loading and after playing). Play lets you see a preview of the movie in the Design view of the Document window. Click the Stop button to stop the movie and return to the Shockwave placeholder. Parameters opens a dialog box in which to enter additional parameters to pass to the Shockwave movie. See “Using parameters” on page 319. The Shockwave movie must have been designed to receive these parameters. ID defines the optional ActiveX ID parameter. This parameter is most often used to pass information between ActiveX controls. V Space and H Space specify the number of pixels of white space above, below, and on both sides of the movie. Adding sound to a page There are several different types of sound files and formats, and several different ways to add sound to a Web page. Some factors to consider before deciding on a format and method for adding sound are its purpose, your audience, file size, sound quality, and differences in browsers. Note: Sound files are handled very differently and inconsistently by different browsers. You may want to save sound files as SWFs to improve consistency. About audio file formats The following list describes the more common audio file formats along with some of the advantages and disadvantages of each for Web design. .midi or .mid (Musical Instrument Digital Interface) format is for instrumental music. MIDI files are supported by many browsers and don’t require a plugin. Although their sound quality is very good, it can vary depending on a visitor’s sound card. A small MIDI file can provide a long sound clip. MIDI files cannot be recorded and must be synthesized on a computer with special hardware and software. .wav (Waveform Extension) format files have good sound quality, are supported by many browsers, and don’t require a plugin. You can record your own WAV files from a CD, tape, microphone, and so on. However, the large file size severely limits the length of sound clips that you can use on your Web pages. Inserting Media 311 .aif (Audio Interchange File Format, or AIFF) format, like WAV format, has good sound quality, can be played by most browsers, and don’t require a plugin; you can also record AIFF files from a CD, tape, microphone, and so on. However, the large file size severely limits the length of sound clips that you can use on your Web pages. .mp3 (Motion Picture Experts Group Audio, or MPEG-Audio Layer-3) format is a compressed format that makes sound files substantially smaller. The sound quality is very good: if an MP3 file is recorded and compressed properly, its quality can rival that of a CD. New technology lets you “stream” the file so that a visitor doesn’t have to wait for the entire file to download before hearing it. However, the file size is larger than a Real Audio file, so a whole song could still take quite a while to download over a normal phone line connection. To play MP3 files, visitors must download and install a helper application or plugin such as QuickTime, Windows Media Player or RealPlayer. .ra, .ram, .rpm, or Real Audio format has a very high degree of compression with smaller file sizes than MP3. Whole song files can be downloaded in a reasonable amount of time. Because the files can be “streamed” from a normal Web server, visitors can begin listening to the sound before the file has completely downloaded. The sound quality is poorer than that of MP3 files, but new players and encoders have improved quality considerably. Visitors must download and install the RealPlayer helper application or plugin in order to play these files. Linking to an audio file Linking to an audio file is a simple and effective way to add sound to a Web page. This method of incorporating sound files lets visitors choose whether they want to listen to the file, and makes the file available to the widest audience. (Some browsers may not support embedded sound files.) To create a link to an audio file: 312 Chapter 13 1 Select the text or image you want to use as the link to the audio file. 2 In the Property inspector, click the folder icon to browse for the audio file, or type the file’s path and name in the Link field. Embedding audio Embedding audio incorporates the sound player directly into the page, but the sound only plays if visitors to your site have the appropriate plugin for the chosen sound file. Embed files if you want to use the sound as background music, or if you want more control over the sound presentation itself. For example, you can set the volume, the way the player looks on the page, and the beginning and ending points of the sound file. To embed an audio file: 1 In Design view, place the insertion point where you want to embed the file. 2 Click the Plugin button in the Objects panel, or choose Insert > Media > Plugin. For more information about the Plugin object, see “Inserting Netscape Navigator plugin content” on page 313. 3 In the Property inspector, click the folder icon to browse for the audio file, or type the file’s path and name in the Link field. 4 Enter the width and height by entering the values in the appropriate fields or by resizing the plugin placeholder in the Document window. These values determine the size at which the audio controls are displayed in the browser. For example, try a width of 144 pixels and a height of 60 pixels to see how the audio player appears in both Navigator and Internet Explorer. Inserting Netscape Navigator plugin content Plugins enhance Netscape Navigator, providing ways to view media content in a wide variety of formats. Plugins are the means by which content files are played and displayed on your Web site. For example, typical plugins include RealPlayer and QuickTime, while some content files themselves include MP3s and QuickTime movies. After you create content for a Navigator plugin, you can use Dreamweaver to insert that content into an HTML document. Dreamweaver uses the embed tag to mark the reference to the content file. To insert Navigator plugin content: 1 In the Design view of the Document window, place the insertion point where you want to insert the content. 2 Click the Plugin button in the Objects panel. 3 In the dialog box that appears, select a content file for a Navigator plugin. Inserting Media 313 Setting Netscape Navigator plugin properties After inserting content for a Netscape Navigator plugin, use the Property inspector to set parameters for that content. To view the following properties in the Property inspector, select a Netscape Navigator plugin object. The Property inspector initially displays the most commonly used properties. Click the expander arrow in the lower right corner to see all properties. Name specifies a name to identify the plugin for scripting. Enter a name in the unlabeled field on the far left side of the Property inspector. W and H specify, in pixels, the width and height allocated to the object on the page. You can also specify the following units: pc (picas), pt (points), in (inches), mm (millimeters), cm (centimeters), or % (percentage of the parent object’s width and height). The abbreviations must follow the value without a space: for example, 3mm. Src specifies the source data file. Click the folder icon to browse to a file, or enter a file name. Plg Url specifies the URL of the pluginspace attribute. Enter the complete URL of the site where users can download the plugin. If the user viewing your page does not have the plugin, the browser tries to download it from this URL. Align determines how the object is aligned on the page. For a description of each option, see “Aligning elements” on page 271. V Space and H Space specify the amount of white space in pixels above, below, and on both sides of the plugin. Border specifies the width of the border around the plugin. Parameters opens a dialog box for entering additional parameters to pass to the Netscape Navigator plugin. See “Using parameters” on page 319. Many plugins respond to special parameters. The Flash plugin, for example, includes parameters for bgcolor, salign, and scale. You can also view the attributes assigned to the selected plugin by clicking the Attribute button. You can edit, add, and delete attributes such as width and height in this dialog box. 314 Chapter 13 Playing plugins in the Document window You can preview movies and animations that rely on Navigator plugins—that is, elements that use the embed tag—directly in the Design view of the Document window. (It is not possible to preview movies or animations that rely on ActiveX controls in the Document window.) You can play all plugin elements at one time to see how the page will look to the user, or you can play each one individually to ensure that you have embedded the correct media element. To play movies, the proper plugins must be installed on your computer. When Dreamweaver starts up, it automatically searches for all installed plugins, looking first in the Configuration/Plugins folder and then in the plugin folders of all installed browsers. To play plugin content in the Document window: 1 Insert one or more media elements by choosing Insert > Media > Shockwave, Insert > Interactive Images > Flash, or Insert > Media > Plugin. 2 Play plugin content: • Select one of the media elements you have inserted, and choose View > Plugins > Play or click the Play button in the Property inspector. • Choose View > Plugins > Play All to play all of the media elements on the selected page that rely on plugins. Note: Play All only applies to the current document; it does not apply to other documents in a frameset, for example. To stop playing plugin content: Select a media element and choose View > Plugins > Stop, or click the Stop button in the Property inspector. You can also choose View > Plugins > Stop All to stop all plugin content from playing. Troubleshooting Navigator plugins If you have followed the steps to play plugin content in the Document window, but some of the plugin content does not play, try the following: • Make sure the associated plugin is installed on your computer, and that the content is compatible with the version of the plugin you have. • Open the file Configuration/Plugins/UnsupportedPlugins.txt in a text editor and look to see if the problematic plugin is listed. This file keeps track of plugins that cause problems in Dreamweaver and are therefore unsupported. (If you experience problems with a particular plugin, consider adding it to this file.) • Check that you have enough memory (and on the Macintosh, check that enough memory is allocated to Dreamweaver). Some plugins require an additional 2 to 5 MB of memory to run. Inserting Media 315 Inserting an ActiveX control ActiveX controls (formerly known as OLE controls) are reusable components, somewhat like miniature applications, that can act like browser plugins. They run in Internet Explorer with Windows, but they don’t run on the Macintosh or in Netscape Navigator. The ActiveX object in Dreamweaver lets you supply attributes and parameters for an ActiveX control in your visitor’s browser. Dreamweaver uses the object tag to mark the place on the page where the ActiveX control will appear, and to provide parameters for the ActiveX control. To insert ActiveX control content: 1 In the Document window, place the insertion point where you want to insert the content and do one of the following: • Click the ActiveX button in the Objects panel. • Choose Insert > Media > ActiveX. • Drag and drop the ActiveX icon. An icon marks where the ActiveX control will appear on the page in Internet Explorer. Setting ActiveX properties After inserting an ActiveX object, use the Property inspector to set attributes of the object tag and parameters for the ActiveX control. Click Parameters in the Property inspector to enter names and values for properties that don’t appear in the Property inspector. There is no widely accepted standard format for parameters for ActiveX controls; to find out which parameters to use, consult the documentation for the ActiveX control you’re using. The Property inspector initially displays the most commonly used properties. Click the expander arrow in the lower right corner to see all properties. Name specifies a name to identify the ActiveX object for scripting. Enter a name in the unlabeled field on the far left side of the Property inspector. W and H specify the width and height of the object in pixels. You can also specify the following units: pc (picas), pt (points), in (inches), mm (millimeters), cm (centimeters), or % (percentage of the parent object’s width and height). The abbreviations must follow the value without a space: for example, 3mm. Class ID identifies the ActiveX control to the browser. Enter a value or choose one from the pop-up menu. When the page is loaded, the browser uses the class ID to locate the ActiveX control required for the ActiveX object associated with the page. If the browser doesn’t locate the specified ActiveX control, it attempts to download it from the location specified in Base. 316 Chapter 13 Embed makes Dreamweaver add an embed tag within the object tag for the ActiveX control. If the ActiveX control has a Netscape Navigator plugin equivalent, the embed tag activates the plugin. Dreamweaver assigns the values you’ve entered as ActiveX properties to their Netscape Navigator plugin equivalents. Align determines how the object is aligned on the page. For a description of each option, see “Aligning elements” on page 271. Parameters opens a dialog box for entering additional parameters to pass to the ActiveX object. See “Using parameters” on page 319. Many ActiveX controls respond to special parameters. Src defines the data file to be used for a Netscape Navigator plugin if the Embed option is turned on. If you don’t enter a value, Dreamweaver attempts to determine the value from the ActiveX properties entered already. V Space and H Space specify the amount of white space in pixels above, below, and on both sides of the object. Base specifies the URL containing the ActiveX control. Internet Explorer downloads the ActiveX control from this location if it has not been installed in the visitor’s system. If you don’t specify a Base parameter and if your visitor doesn’t already have the relevant ActiveX control installed, the browser can’t display the ActiveX object. Alt Img specifies object an image to be displayed if the browser doesn’t support the tag. This option is available only when the Embed option is deselected. ID defines the optional ActiveX ID parameter. This parameter is most often used to pass information between ActiveX controls. Data specifies a data file for the ActiveX control to load. Many ActiveX controls, such as Shockwave and RealPlayer, do not use this parameter. Borders specifies the width of the border around the object. Inserting Media 317 Inserting a Java applet Java is a programming language that allows the development of lightweight applications (applets) that can be embedded in Web pages. After you create a Java applet, you can insert that applet into an HTML document using Dreamweaver. Dreamweaver uses the applet tag to mark the reference to the applet file. To insert a Java applet: 1 In the Document window, place the insertion point where you want to insert the applet. 2 Click the Applet button in the Objects panel. 3 In the dialog box that appears, select a file containing a Java applet. Setting Java applet properties After inserting a Java applet, use the Property inspector to set parameters. To view the following properties in the Property inspector, select a Java applet. The Property inspector initially displays the most commonly used properties. Click the expander arrow in the lower right corner to see all properties. Name specifies a name to identify the applet for scripting. Enter a name in the unlabeled field on the far left side of the Property inspector. W and H specify the width and height of the applet in pixels. You can also specify the following units: pc (picas), pt (points), in (inches), mm (millimeters), cm (centimeters), or % (percentage of the parent object’s width or height). The abbreviations must follow the value without a space: for example, 3mm. Code specifies the file containing the applet’s Java code. Click the folder icon to browse to a file, or enter a file name. Base identifies the folder containing the selected applet. When you choose an applet, this field is filled automatically. Align determines how the object is aligned on the page. For a description of each option, see “Aligning elements” on page 271. Alt specifies alternative content (usually an image) to be displayed if the user’s browser doesn’t support Java applets or has Java disabled. If you enter text, Dreamweaver renders the text with the alt attribute of the applet tag. If you choose an image, Dreamweaver inserts an img tag between the opening and closing applet tags. Note: To specify alternative content that is viewable in both Netscape Navigator (with Java disabled) and Lynx (a text-based browser), select an image and then manually add an alt attribute to the img tag in the Code inspector. 318 Chapter 13 V Space and H Space specify the amount of white space in pixels above, below, and on both sides of the applet. Parameters opens a dialog box for entering additional parameters to pass to the applet. Many applets respond to special parameters. Using parameters Use the Parameters dialog box to enter values for special parameters defined for Shockwave and Flash movies, ActiveX controls, Netscape Navigator plugins, and Java applets. Parameters are used with the object, embed, and applet tags. Parameters set attributes specific to the type of object being inserted. For example, a Flash movie object can have a quality parameter for the object tag. The Parameter dialog box is available from the Property inspector. See the documentation for the object you’re using for information on the parameters it requires. Note: There is no widely accepted standard for identifying data files for ActiveX controls. Consult the documentation for the ActiveX control you’re using to find out which parameters to use. To open the Parameters dialog box: 1 Select an object that can have parameters (such as a Shockwave movie, an ActiveX control, a Navigator plugin, or a Java applet) in the Document window. 2 Open the dialog box by using one of these methods: • Right-click (Windows) or Control-click (Macintosh) the object, and choose Parameters from the context menu. • Open the Property inspector if it isn’t already open, and click the Parameters button found in the lower half of the Property inspector. (Make sure the Property inspector is expanded.) To enter a value for a parameter in the Parameters dialog box: 1 Click the Plus (+) button. 2 Enter the name of the parameter in the Parameter column. 3 Enter the value of the parameter in the Value column. To remove parameters: Select a parameter and press the Minus (-) button. To reorder parameters: Select a parameter and use the up and down arrow buttons. Inserting Media 319 Using behaviors to control media You can add behaviors to your page to start and stop various media objects. Control Shockwave or Flash lets you play, stop, rewind, or go to a frame in a Shockwave or Flash movie. See “Control Shockwave or Flash” on page 450. Play Sound lets you play a sound. For example, you can play a sound effect whenever the user moves the mouse pointer over a link. See “Play Sound” on page 458. Check Plugin lets you check to see if visitors to your site have the required plugin installed, then route them to different URLs, depending on whether they have the right plug-in. This only applies to Netscape Plugins, as the Check plugin behavior does not check for ActiveX controls. See “Check Plugin” on page 449. 320 Chapter 13 14 CHAPTER 14 Editing HTML in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Although Macromedia Dreamweaver allows you to create and edit Web pages visually without worrying about the HTML source code, there are times when you may need access to your page’s underlying HTML. Being able to edit the HTML can provide you with more control to modify and troubleshoot your Web page. For example, suppose you select text on your document and apply a new font, but it only affects half the sentence. By looking at the HTML code in Dreamweaver Code view (or Code inspector), you discover that the closing tag is in the middle of the sentence; all you have to do is move to the end of your sentence and the problem is fixed. If you are interested in learning HTML, using the Dreamweaver visual editing capabilities along with its Code view (or Code inspector) is a great way to understand how HTML works. You can compare the HTML code to the visual view to see how it corresponds. Dreamweaver provides access to the HTML code through the Code view, the Code inspector, and the Quick Tag Editor. For help in understanding and writing HTML code, use the Dreamweaver Reference panel. Dreamweaver also gives you the ability to open HTML files written elsewhere without worrying about your code being compromised. Dreamweaver uses Roundtrip HTML to make sure your HTML content and structure do not change as you switch back and forth between Dreamweaver and an external HTML editor. In addition, you can use Dreamweaver to clean up HTML files that contain messy or unreadable code. 321 Understanding basic HTML tags It can be useful to have a basic understanding of HTML when using Dreamweaver. You can easily see both the HTML code and the visual design at the same time, which gives you the opportunity to figure out how HTML code works. Understanding and being able to modify the code can help you troubleshoot your Web pages. If you are new to HTML, the following explanations provide a brief overview. If you already know HTML, skip ahead to the next section. HTML is a text markup language. This means that HTML documents are plain text documents that have specific “markup” tags that tell the Web browser how to display the text. For example, the i tag controls italic text. By placing in your HTML, you tell the browser that the subsequent text should be italic. By placing in your HTML, you tell the browser that the subsequent text should revert to the default text. The tag with a slash (/) is called the closing tag. Web browsers interpret these tags in your HTML document and display the text with the proper formatting. Some tags have attributes that you can use with them. For example, you can specify the alignment of an image within the image tag: . align is an attribute of the image tag. Structure of a document Every HTML document (Web page) must contain certain standard tags—the tag and body tag. The head section contains the title of the Web page (and any scripts), and the body section contains the actual text that will appear in the Web page as it is displayed in the browser. head Here is the structure of a sample document:
Welcome to my page
The p is a paragraph tag, which tells the browser that this is all one paragraph.
Welcome to my home page.
I am a two-year-old part Siamese cat who lives in San Francisco with my two owners.
; you must put the file name of the image between quotation marks. Image tags also have attributes that you can use, such as width, height, border, align, and valign. The width and height attributes specify the size of your image for the Web browser to interpret; you can set the border width to 0 or above (images display a border by default when used as links). The align and valign attributes set alignment of your image: align (for horizontal alignment) can be set to left, right, or center, and valign (vertical alignment) can be set to top, bottom, or middle. The following example shows a complete image tag: . About Roundtrip HTML Roundtrip HTML is a unique feature in Dreamweaver that lets you move your documents back and forth between a text-based HTML editor and Dreamweaver with little or no effect on the content and structure of the document’s original HTML source code. Dreamweaver even maintains and renders some HTML that is technically invalid (such as a font tag enclosing multiple p tags) if such code is supported by browsers. However, the HTML source code that Dreamweaver generates as you edit graphically is always technically valid. The following are key features of Roundtrip HTML: • By default, Dreamweaver rewrites overlapping tags, closes open tags that aren’t allowed to remain open, and removes extra closing tags when you switch back to Dreamweaver from an external HTML editor or when you open an existing HTML document. If you don’t want Dreamweaver to rewrite any HTML, choose Edit > Preferences, then select Code Rewriting to turn off all rewriting. See “Setting Code Rewriting preferences” on page 346. If you turn off code rewriting, any HTML that Dreamweaver would have rewritten is displayed as invalid. • When Highlight Invalid HTML is turned on, Dreamweaver highlights invalid HTML (that it does not support) in yellow. When you select an invalid tag, Dreamweaver displays information in the Property inspector about how to correct the error. Highlight Invalid HTML is turned on by default in the Code view (or Code inspector). To turn it off, choose Highlight Invalid HTML from the Options menu in the Code view (or Code inspector) window. Error highlighting is always on in the Design view. Note: Enable/Disable Invalid HTML Highlighting is only available in the Code view (or Code inspector). Design view always displays error highlighting. Editing HTML in Dreamweaver 329 • Dreamweaver does not change tags that it does not recognize—including XML tags—because it has no criteria by which to judge them valid or invalid. If an unrecognizable tag overlaps a valid one, Dreamweaver may mark it as erroneous but does not rewrite the code. For example, the custom tag in the following would be marked erroneous:
APPLET
tag."
Code
Codebase
Height
HSpace
ID !Warning !htmlmsg="This browser ignores the
ID
attribute for the APPLET
tag.
Use NAME
instead."
Name
Style !Warning !htmlmsg="This browser ignores the
STYLE
attribute for the APPLET
tag."
VSpace
Width
>
Creating and editing a browser profile
Create a browser profile by modifying an existing profile. For example, to create
a profile for a future version of Microsoft Internet Explorer, you can open the
profile for the most recent version of Internet Explorer that has a profile, add
any new tags or attributes introduced in the new version, and save it as a profile
for the new version.
Note: Before you create a browser profile for a new version of a browser, check the
Macromedia Exchange for Dreamweaver site to see if Macromedia has supplied a browser
profile that you can download and install using the Package Manager.
534
Chapter 22
To create or edit a browser profile:
1
Using a text editor, open an existing profile.
If you’re creating a new profile, open the profile that most closely resembles the
profile you intend to create, then save the file under a new file name.
2
If you’re creating a new profile, change the name that appears on the first line of
text in the file.
Two profiles cannot have the same name.
3
Add any new tags or attributes you know to be supported by the browser, using
the syntax shown in “About browser-profile formatting” on page 532.
If you don’t want to receive error messages about a particular unsupported tag,
add it to the list of supported tags. If you do this, save the profile in a separate
file with a new file name (such as Browsername x.x limited). Renaming the
profile preserves the original profile with only the tags that are truly supported.
4
Delete any tags or attributes that are not supported by the browser.
This step is probably unnecessary if you are creating a profile for a new version
of Netscape Navigator or Microsoft Internet Explorer, because browsers rarely
drop support for tags.
5
Add any custom error messages according to the syntax shown in “About
browser-profile formatting” on page 532.
The profiles that come with Dreamweaver list all supported tags for the
specified browsers. To add a custom error message to a tag, add either !msg
"message" or !htmlmsg "This is a paragraph that includes an instance of the
happy
tag (
Shift+Enter Shift+Return Insert a nonbreaking space Control+Shift+Spacebar Option+Spacebar Move text or object to another place in the page Drag selected item to new location Drag selected item to new location Copy text or object to another place in the page Control-drag selected item to new location Option-drag selected item to new location Select a word Double-click Double-click Add selected items to library Control+Shift+B Command+Shift+B Switch between design view and code editors Control+Tab Option+Tab Open and close the Property inspector Control+Shift+J Command+Shift+J Check spelling Shift+F7 Shift+F7 Keyboard Shortcuts 549 Formatting text Action Windows Macintosh Indent Control+] Command+] Outdent Control+[ Command+[ Format > None Control+0 (zero) Command+0 (zero) Paragraph Format Control+Shift+P Command+Shift+P Apply Headings 1 through 6 to a paragraph Control+1 through 6 Command+1 through 6 Alignment > Left Control+Shift+Alt+L Command+Shift+ Option+L Alignment > Center Control+Shift+Alt+C Command+Shift+ Option+C Alignment > Right Control+Shift+Alt+R Command+Shift+ Option+R Make selected text bold Control+B Command+B Make selected text italic Control+I Command+I Edit Style Sheet Control+Shift+E Command+Shift+E Note: Some text formatting shortcuts have no effect when working in the code editors. Finding and replacing text 550 Appendix Action Windows Macintosh Find Control+F Command+F Find Next/Find Again F3 Command+G Replace Control+H Command+H Working in tables Action Windows Macintosh Select table (with cursor inside the Control+A table) Command+A Move to the next cell Tab Tab Move to the previous cell Shift+Tab Shift+Tab Insert a row (before current) Control+M Command+M Add a row at end of table Tab in the last cell Tab in the last cell Delete the current row Control+Shift+M Command+Shift+M Insert a column Control+Shift+A Command+Shift+A Delete a column Control+Shift+ - (hyphen) Command+Shift+ (hyphen) Merge selected table cells Control+Alt+M Command+Option+M Split table cells Control+Alt+S Command+Option+S Update table layout (forces a redraw when in “faster table editing” mode) Control+Spacebar Command+Spacebar Note: Some table shortcuts do not work in Layout view. Working with frames Action Windows Macintosh Select a frame Alt-click in frame Shift+Option-click in frame Select next frame or frameset Alt+Right Arrow Command+Right Arrow Select previous frame or frameset Alt+Left Arrow Command+Left Arrow Select parent frameset Alt+Up Arrow Command+Up Arrow Select first child frame or frameset Alt+Down Arrow Command+Down Arrow Add a new frame to frameset Option-drag frame border Alt-drag frame border Add a new frame to frameset using Alt+Control-drag push method frame border Command+Option-drag frame border Keyboard Shortcuts 551 Working with layers Action Windows Macintosh Select a layer Control+Shift-click Command+Shift-click Select and move layer Shift+Control-drag Command+Shift-drag Add or remove layer from selection Shift-click layer Shift-click layer Move selected layer by pixels Arrow keys Arrow keys Move selected layer by snapping increment Shift+arrow keys Shift+arrow keys Resize selected layer by pixels Control+Arrow keys Option+arrow keys Resize selected layer by snapping increment Control+Shift+arrow keys Option+Shift+arrow keys Align selected layers to the Top/Bottom/Left/Right of the last selected layer Control+Up/Down/Left/ Right Arrow Command+Up/Down/ Left/Right Arrow Make selected layers the same width Control+Shift+[ Command+Shift+[ Make selected layers the same height Control+Shift+] Command+Shift+] Toggle nesting preference on or off when creating a layer Control-drag Command-drag Toggle the display of the grid Control+Shift+Alt+G Command+Shift+ Option+G Snap To grid Control+Alt+G Command+Option+G Working with timelines 552 Appendix Action Windows Macintosh Add object to timeline Control+Alt+Shift+T Command+Option+ Shift+T Add a keyframe Shift+F9 Shift+F9 Remove a keyframe Delete Delete Working with images Action Windows Macintosh Change image source attribute Double-click image Double-click image Edit image in external editor Control–double-click image Command–double-click image Managing hyperlinks Action Windows Macintosh Create hyperlink (select text) Control+L Command+L Remove hyperlink Control+Shift+L Command+Shift+L Drag and drop to create a hyperlink from a document Select the text, image, or object, then Shift-drag the selection to a file in the Site window Select the text, image, or object, then Shift-drag the selection to a file in the Site window Drag and drop to create a hyperlink using the Property inspector Select the text, image, or object, then drag the point-to-file icon in Property inspector to a file in the Site window Select the text, image, or object, then drag the point-to-file icon in Property inspector to a file in the Site window Open the linked-to document in Dreamweaver Control–double-click link Command– double-click link Check links selected Shift+F8 Shift+F8 Check links in the entire site Control+F8 Command+F8 Targeting and previewing in browsers Action Windows Macintosh Preview in primary browser F12 F12 Preview in secondary browser Control+F12 Command+F12 Keyboard Shortcuts 553 Debugging in browsers Action Windows Macintosh Debug in primary browser Alt+F12 Option+F12 Debug in secondary browser Control+Alt+F12 Command+Option+F12 Site management and FTP 554 Appendix Action Windows Macintosh Create new file Control+Shift+N Command+Shift+N Create new folder Control+Shift+Alt+N Command+Shift+ Option+N Open selection Control+Shift+Alt+O Command+Shift+ Option+O Get selected files or folders from remote FTP site Control+Shift+D or drag files from Remote to Local pane in Site window Command+Shift+D or drag files from Remote to Local pane in Site window Put selected files or folders to remote FTP site Control+Shift+U or drag files from Local to Remote pane in Site window Command+Shift+U or drag files from Local to Remote pane in Site window Check out Control+Shift+Alt+D Command+Shift+ Option+D Check in Control+Shift+Alt+U Command+Shift+ Option+U View site map Alt+F8 Option+F8 Refresh remote site Alt+F5 Option+F5 Site map Action Windows Macintosh View site files F8 F8 Refresh Local pane Shift+F5 Shift+F5 Make root Control+Shift+R Command+Shift+R Link to existing file Control+Shift+K Command+Shift+K Change link Control+L Command+L Remove link Delete Delete Show/Hide link Control+Shift+Y Command+Shift+Y Show page titles Control+Shift+T Command+Shift+T Rename file F2 n/a Zoom in site map Control+ + (plus) Command+ + (plus) Zoom out site map Control+ - (hyphen) Command+ - (hyphen) Action Windows Macintosh Play plugin Control+Alt+P Command+Option+P Stop plugin Control+Alt+X Command+Option+X Play all plugins Control+Shift+Alt+P Command+Shift+ Option+P Stop all plugins Control+Shift+Alt+X Command+Shift+ Option+X Playing plugins Working with templates Action Windows Macintosh Create new editable region Control+Alt+V Command+Option+V Keyboard Shortcuts 555 Inserting objects To insert Windows Macintosh Any object (image, Shockwave movie, and so on) Drag file from the Explorer or Site window to the Document window Drag file from the Finder or Site window to the Document window Image Control+Alt+I Command+Option+I Table Control+Alt+T Command+Option+T Flash movie Control+Alt+F Command+Option+F Shockwave Director movie Control+Alt+D Command+Option+D Named anchor Control+Alt+A Command+Option+A Action Windows Macintosh Open the History panel Shift F10 Shift F10 Start/stop recording command Control+Shift+X Command+Shift+X Play recorded command Control+P Command+P History panel 556 Appendix Opening and closing panels To toggle the display of Windows Macintosh Objects Control+F2 Command+F2 Properties Control+F3 Command+F3 Site Files F5 F5 Site Map Control+F5 Command+F5 Assets F11 F11 CSS Styles Shift+F11 Shift+F11 HTML Styles Control+F11 Command+F11 Behaviors Shift+F3 Shift+F3 History Shift+F10 Shift+F10 Timelines Shift+F9 Shift+F9 Code inspector F10 F10 Frames Shift+F2 Shift+F2 Layers F2 F2 Reference Control+Shift+F1 Command+Shift+F1 Show/Hide Floating panels F4 F4 Minimize all windows Shift+F4 Restore all windows Alt+Shift+F4 Getting help Action Windows Macintosh Using Dreamweaver Help Topics F1 F1 Reference Shift+F1 Shift+F1 Dreamweaver Support Center Control+F1 Command+F1 Keyboard Shortcuts 557 Keyboard Shortcut Matrix Note: An asterisk (*) indicates an unused key combination. Italics indicate system-level commands. Keyboard character Control (Windows) or Command (Macintosh) Control+Shift (Windows) or Command+Shift (Macintosh) Control+Alt (Windows) or Command+ Option (Macintosh) Control+Shift+Alt (Windows) or Command+ Shift+Option (Macintosh) A Select All, Select Table Insert Table Column Insert Named Anchor * B Bold (toggle) Add to Library * * C Copy * * Center justify D Duplicate Get Selected Files or Folders Insert Shockwave Director Movie Check Out Selected Files or Folders E Launch External Editor Edit Style Sheet * * F Find and Replace * Insert Flash Movie * G Find Next (Macintosh only) * Show/Hide Grids Snap to Grid (toggle) H Replace * * * I Italic (toggle) Show Invisibles (toggle) Insert Image * J Page Properties Property inspector (toggle) * * K * * * * L Create Link Remove Link * Left Justify M Insert Table Row Delete Table Row Merge Selected Table Cells * N New Window (Windows) New Page (Macintosh) New Page (Windows only) * New Site Folder O Open Open in Frame * Open Selected Site File P Play Recorded Command Paragraph Format Play Plugin Play All Plugins Q Quit * * * R * Make Root Show/Hide Rulers Right Justify 558 Appendix Keyboard character Control (Windows) or Command (Macintosh) Control+Shift (Windows) or Command+Shift (Macintosh) Control+Alt (Windows) or Command+ Option (Macintosh) Control+Shift+Alt (Windows) or Command+ Shift+Option (Macintosh) S Save Save All Split Table Cell * T Quick Tag Editor Show Page Titles in Site Toolbar Insert Table Add Object to Timeline U Preferences Put Selected Files or Folders * Check In Selected Files or Folders V Paste * Create New Editable Region * W Close View Head Content * * X Cut Start Recording Command Stop Plugin Stop All Plugins Y Redo Show/Hide Link * * Z Undo Redo * * 0 (zero) Set Paragraph Format to None * * * 1 Apply Heading 1 to Paragraph * * * 2 Apply Heading 2 to Paragraph * * * 3 Apply Heading 3 to Paragraph * * * 4 Apply Heading 4 to Paragraph * * * 5 Apply Heading 5 to Paragraph * * * 6 Apply Heading 6 to Paragraph * * * 7 * * * * 8 * * * * 9 * * * * - (minus) and Site Map Zoom Out _ (Underscore) Delete Table Column * * = and + Site Map Zoom In * * Fit to Window Keyboard Shortcuts 559 Keyboard character Control (Windows) or Command (Macintosh) Control+Shift (Windows) or Command+Shift (Macintosh) Control+Alt (Windows) or Command+ Option (Macintosh) Control+Shift+Alt (Windows) or Command+ Shift+Option (Macintosh) [ and { Outdent (Move Backward) Make Layers Same Width (Layers) * * ] and } Indent (Move Forward) Make Layers Same Height (Layers) * * > * Select Child Tag * < * Select Parent Tag * * ? and / * * * * ; and : * * * * ‘ and “ * * * * ‘ and ~ * * * * \ and | * * * * Spacebar Update Table Layout Insert Non-breaking Space (Windows) (Option+ Spacebar on Macintosh) * * Control+ Alt (Windows) or Command+ Option (Macintosh) Control+ Shift+Alt (Windows) or Command+ Shift+ Option (Macintosh) Dreamweave Reference Panel r Support Center * * * Object panel * * * * Property Inspector * * * Close Window (Macintosh only) * * * * * * Function Key No modifier Shift Alt (Windows) or Option (Macintosh) Control (Windows) or Command (Macintosh) F1 Reference Using Dreamweav er Help * F2 Layers Frames F3 Find again (Windows only) Behaviors panel F4 Hide/Show Floating panels Minimize all Close Windows windows (Windows only) F5 Site Files Refresh Refresh Site Map Local Pane Remote Pane 560 Appendix Control+ Shift (Windows) or Command+ Shift (Macintosh) Function Key No modifier Shift Alt (Windows) or Option (Macintosh) Control (Windows) or Command (Macintosh) Control+ Shift (Windows) or Command+ Shift (Macintosh) Control+ Alt (Windows) or Command+ Option (Macintosh) Control+ Shift+Alt (Windows) or Command+ Shift+ Option (Macintosh) F6 * * * Switch to Layout view Switch to Standard view * * F7 * Check Spelling * * * * * F8 * Check Links Selected * Check Links - * Entire Site * * F9 * Timeline and Add keyframe * * * * * F10 Code inspector History panel * * * * * F11 Assets CSS Styles * HTML Styles * * * F12 Preview in Primary Browser * Preview in Secondary Browser Debug in Secondary Browser * Debug in Primary Browser * Keyboard Shortcuts 561 562 Appendix INDEX A Absolute Bottom alignment (image Property inspector) 271 Absolute Middle alignment (image Property inspector) 271 Absolute paths 354 actions browser compatibility 444 changing in behaviors 442 choosing in Behaviors panel 439 controlling timelines 434 creating 443 defined 435 included with Dreamweaver 444–471 See also individual actions by name Active Links color option (Page Properties) 153 Active Server Pages (ASP) about 542 editing 352 tags, customizing parsing and appearance 537 ActiveX controls inserting 316 overview 316 properties 316 resizing 272 Add Frame command 427 Add Object to Library command 397 Add Object to Timeline command 427 Add/Remove Netscape Resize Fix command 412 adding extensions to Dreamweaver 93 frames to a timeline 429 links 226 objects to a timeline 427 Adjust Position command 158 Align image property 270 Align with Selection command 159 aligning layers 415 options 271 page elements 271 text 241 tracing images 159 All Info tab (Design Notes) 136 Alt image property 270 Always Nest When Created Within Existing Layer option 412 Anchor object (Objects panel) 363 anchors, named 362 animation, editing Fireworks animations 292 animations along complex path 428 applying to objects 432 copying and pasting 431 creating 427 improving 433 overview 19 timelines 425 anonymous file upload 489 AppleTalk servers 124 applets. See Java applets applications, other, using with Dreamweaver 89 Apply Source Formatting command 348 Apply Source Formatting option (Clean Up Word HTML command) 349 Apply Template to Page command 389 applying colors to text 226 arranging views 332 ASP. See Active Server Pages assets 221, 232 adding to Favorites list 225 applying colors to text 226 categories 222 colors, creating 231 editing 227 Favorites folders 231 Favorites lists 229 563 assets (continued) inserting 225 opening the Assets panel 223 overview 221 planning 101 refreshing the Site list 224 selecting multiple 227 URLs, creating 231 attributes in browser profiles 532 searches 260 See also tags audio. See sound Auto Apply option (HTML Styles panel) 245 Automatic Wrapping option (Code Format preferences) 345 automating tasks 160 Autoplay option 425 Autoplay option (Timelines panel) 426 autostretch (Layout view) 179 B background page image and color 153 transparency in 153 Background option (Code Colors preferences) 343 balancing braces 337 Baseline alignment (image Property inspector) 271 Basic Info tab (Design Notes) 136 basics of Dreamweaver 20 BBEdit integration (Macintosh only) 351 behaviors 435–471 actions, creating 443 and forms 500 and images 280 and library items 401 and links 374 and media 320 and templates 388 and timelines 442 attaching 439 changing 442 channel in timelines 425 compatibility with browsers 444 defined 435 deleting 442 third-party 443 triggering 439 564 Index Behaviors panel 436 bitmaps, resizing 272 See also images body tag 159 bold text 239 Border image property 270 borders adding to a table 190 in a frame 217 table, removing 185 Bottom alignment (image Property inspector) 271 braces, balancing 337 branches, expanding and collapsing in site map 122 breakpoints in JavaScript debugger 477 broken links 506 Browser Default alignment (image Property inspector) 271 browsers 3.0 compatible files 424 and CSS styles 256 colors, safe 88 compatibility, planning 97 compatibility, testing 502 detecting 503 previewing in 504 primary, defining 504 profiles, creating 534 profiles, editing 532 secondary, defining 505 targeting 502 versions, checking 447 buttons creating form buttons 496 Go buttons 456 Submit buttons, graphical 497 C Cache option (Site Definition dialog box) 103, 104 Call JavaScript action 446 Case for Attributes option (Code Format preferences) 345 Case for Tags option (Code Format preferences) 345 categories assets 222 preferences 88 Cell Padding option (Insert Table) 184 Cell Spacing option (Insert Table) 184 cells. See layout cells, table cells Centering option (Code Format preferences) 345 CFML. See ColdFusion Markup Language CGI, reference material 25 CGI (Common Gateway Interface), scripts 499 Change Link Sitewide command 368 Change Property action 446 characters, special 236 Check Browser action 447 Check In/Check Out options 132 entering a check-out name 132 entering an e-mail address 132 Check In/Check Out reports 141 Check Links Sitewide command 507 Check Out Files When Opening option 132 Check Plugin action 449 Check Spelling command 258 Check Target Browsers command 502 checkboxes 491 checking files in and out 131, 134 overview 131 undoing a check out 134 checking links 506 class attribute 252 Clean up Tags option 349 Clean up CSS option 349 Clean Up HTML command 347 Clean Up Word HTML command 348 Clear Paragraph Style option 246 Clear Selection Style option 246 code editing with BBEdit 351 formatting preferences 343 Code inspector Document window, switching to 332 opening 332 Code view arranging views 332 opening 331 opening non-HTML files 338 options 333 writing and editing code 334 ColdFusion Markup Language (CFML) and Dreamweaver 330 editing CFML tags 352 overview 543 tags, customizing parsing and appearance 537 color box option 87 Color command 240 Color Cubes color palette 87 color picker Dreamweaver 87 system 87 Color Wheel (System Color) button 87 color-blindness 153 colors as assets. See assets choosing 87 contrast 153 creating color assets 231 default for page text 153 eyedropper, using 87 frame background 217 page background 153 swatches 87 text, changing 226, 240 Web-safe 88 column header menu 180 Columns option (Insert Table) 184 columns, rows, and cells adding and removing 196 background color, adding 192 formatting 191 Combinable Nested Font Tags 510 Combine Nested Tags When Possible option 347 combining floating panels 82 commands accessing from context menu 78, 79 creating, from history steps 165 recording 166 renaming 520 Commands menu, editing 518 Comments option (Code Colors preferences) 343 comments, inserting 327 Common Gateway Interface (CGI). See CGI 499 Configuration folder Behaviors subfolder 529 BrowserProfiles subfolder 532 Commands subfolder 529 Extensions.txt file 514 menus.xml file 517 Objects subfolder 515 SourceFormat.txt file 530 ThirdPartyTags subfolder 537 Index 565 Connecting to remote sites, using, source-control systems 127 Connection Speed option 76 content, adding to tables 185 context menus 78, 79 customizing 519 Continuous Tone color palette 87 Control Shockwave or Flash action 450 conventions 22 Convert Layers to Tables command 422 Convert Tables to Layers command 424 copying and pasting, Fireworks HTML 283 copying history steps 164 Create Web Photo Album command 294 creating, templates 377 creating colors and URLs 231 creating new Flash button templates 306 Creating radio buttons 493 creating reports 510 CSS Layers, exporting from Fireworks 284 CSS Styles, exporting 254 CSS styles applying custom 254 attributes, converting to HTML 257 class attribute 252 creating 252 selectors 252 CSS Styles panel 255 custom styles. See style sheets customizing Dreamweaver 513, 544 basics 90 dialog boxes 529 Launcher bar and Launcher 77 menus 517 Objects panel 515 tags, third-party 537 D dates, inserting 235 debugger. See JavaScript debugger Default Color button 87 default file type, changing 514 Define HTML Style dialog box 245 dependent files getting 144 putting 145 showing and hiding 121 566 Index Design Notes adding status choices 137 disabling 137 for documents and objects 136 for Dreamweaver and Fireworks integration 287 for Fireworks files 140 for media objects 300 overview 134 reports 141 running a report 142 saving file information 135 setting up 135 design of pages 100 Design view arranging views 332 displaying with Code view 331 Detach from Original option 401 Detach from Template command 391 detecting browsers and plugins 503 dialog boxes, customizing 529 Director, creating Shockwave movies with 310 directory structure, site. See sites display options floating panels 83 fonts 89 displaying layers 420 tracing images 158 docking floating panels 82 Document window basics 74 Code inspector, switching to 332 frames in 211 Launcher bar 74 opening documents 150 page size and download time 74 playing Navigator plugins 315 resizing 75 searching for text 258 selecting elements 154 tag selector 74 title bar 74 Window Size pop-up menu 74 document-relative paths about 355 setting 359 documents checking links 506 creating 150 creating, based on templates 388 Design Notes, using with 134 download size, time 509 new 150 opening 150 page title 152 previewing in browsers 504 saving 151 searching 258 setting properties 152 templates, detaching from 391 text, adding 234 download time 74 downloading behaviors 443 size, time estimates 509 Drag Layer action 451 drawing layers 409 layout cells and tables 170 Dreamweaver and Fireworks integration creating Web photo albums 294 Design Notes 287 editing Fireworks animations 292 exporting CSS Layers 284 exporting Dreamweaver library items 285 external editor preference 286 inserting Fireworks files 282 Launch and Edit preferences 287 launching and editing Fireworks images 288 launching and editing Fireworks tables 289 launching and optimizing Fireworks images 290 Optimize Image in Fireworks command 290 resizing Fireworks images 291 updating Fireworks HTML 293 Dreamweaver discussion group 16 Dreamweaver Help Pages 14 Dreamweaver libraries, exporting from Fireworks 285 Dreamweaver Support Center 16 E Edit button (image Property inspector) 270 Edit Font List command 242 Edit NoFrames Content command 219 Edit Style Sheet command 252 editing assets 227 Flash button objects 303 keyboard shortcuts 90 templates 377 editing code (Code view or Code inspector) 334 editors. See external editors elements aligning 271 viewing invisible 547 e-mail address, using with check in/check out system 132 e-mail files 150 e-mail links changing 368 creating 364, 365 embedding audio 313 Enable File Check In and Check Out option 132 encodings 89 entities 236 errors in JavaScript code 476 event handlers. See events events available for different browsers and objects 436 changing in behaviors 442 defined 435 triggering actions 439 Excel. See Microsoft Excel files, importing. Export Table command 202 exporting CSS Layers from Fireworks 284 Fireworks files to Dreamweaver 284 library items from Fireworks 285 XML, tag notations for 395 exporting styles 254 Extending Dreamweaver book and Help pages 16 extensibility JavaScript 536 overview 536 third-party behaviors 443 extensions 93 reloading 515 Index 567 external editors BBEdit (Macintosh only), integration with 351 Fireworks. See Dreamweaver and Fireworks integration HomeSite (Windows) 330 HTML, overview 350 images 277 media 298 preference 286 text, overview 350 external links 506 external style sheets creating 250 editing 252 linking to 250 eyedropper 87 F Favorites folders 231 Favorites list (Assets panel). See assets 225 features, new in Dreamweaver 22 fields about form fields 485 creating hidden fields 490 creating text fields 486 file fields 489 uploading files to a server 489 file formats, image 267 file types, Flash files 300 File Types/Editors preferences 299 File View Columns accessing 139 adding a column 140 changing the order 139 deleting 140 using with Design Notes 138 files downloading 143 getting from remote site 143 managing 108 putting 144 searching 258 synchronizing local and remote sites 146 text 150 transferring with FTP 124 types, default 514 uploading 144 viewing in Site window 115 568 Index Find In options 259 finding and replacing. See searching firewalls defining host and port 111 options 125 Fireworks, Design Notes in 140 Fireworks and Dreamweaver integration. See Dreamweaver and Fireworks integration Fix Invalidly Nested and Unclosed Tags option (Code Rewriting preferences) 346 Fix Invalidly Nested Tags option (Clean Up Word HTML) 349 Flash button dialog box 301 Flash button objects 301, 306 modifying 303 previewing 303 properties 305 Flash content, overview 300 Flash movies as assets. See assets controlling 450 inserting 307 overview 300 properties 308 resizing 272 Flash object properties 305 Flash Text dialog box 304 Flash Text objects, inserting 304 Flash text objects previewing 303 properties 305 floating panels, See panels folders root 102 searching 258 folders, Favorites 231 Font Combination option 242 fonts changing characteristics 239 changing combinations 242 encodings, setting fonts for 89 Fonts/Encoding preferences 89 Format option 242 Format Table command 193 formatting HTML source code customizing 530 preferences 343 forms adding multiple objects 498 adding to a document 484 behaviors, using with 500 client-side scripting 499 creating 483 creating file fields 489 fields, validating 470 inserting tables 498 jump menus, creating 369 objects, adding 485 overview 481 password field 486 processing 499 server-side scripting 499 Submit buttons 497 fps (frames per second) 425 frames 203–220 behaviors, using with 220 borders 217 browser compatibility 219 changing background color 217 changing content 218 creating 206, 207 deleting 207 nested 208 overview 203 panel 209 properties 212 resizing 216 saving 211 selecting 208 shortcuts 551 steps in creating 205 targeting 218 using links 218 Frames and Framesets option (Code Format preferences) 344 Frames panel 209 frames per second (fps) 425 framesets 206–217 borders 217 naming 212 nested 208 predefined, inserting 206 properties 214 saving 211 selecting 208 targeting links in 359 See also frames FTP connecting to a Web server 124 determining a host directory 126 log 144 transferring files with 124 troubleshooting 130 FTP Host Name field 125 G General preferences 88 Generator objects, overview 309 Get and Put Newer Files option 146 Get command 143 Get More Behaviors command 443 Get Newer Files from Remote option 146 getting files from a remote server 143 GIF images as tracing image 158 uses for 267 Go button, associating with a jump menu 456 Go To Timeline Frame action 468 Go To URL action 454 graphics. See images Grayscale color palette 87 grid as guide 157 showing 174, 416 snap to 174 snapping layers to 416 spacing 174 Guided Tour overview 13 Index 569 H head section, editing content in 159 header cell, formatting 192 heading tags 240 Help 14 Dreamweaver discussion group 16 Dreamweaver Support Center 16 shortcuts 557 hidden files, showing and hiding 121 hiding invisible elements 156 History panel automating tasks with 160 clearing the history list 86 commands, creating from history steps 165 maximum steps, setting 86 overview 84 steps, applying to other objects 162 steps, copying and pasting 164 steps, repeating 161 home page, setting 120 HomeSite (Windows) 330 horizontal rules, inserting and modifying 243 Host Directory field 126 hotspots applying behaviors to 280 in image maps 273 properties 274 resizing 275 selecting multiple in an image map 275 hr (horizontal rule), inserting 243 HTML Corrections log file 348 HTML documents. See documents 150 HTML files, importing 150 HTML source code cleaning up 347 cleaning up MS Word HTML 348 copying and pasting from Fireworks to Dreamweaver 283 copying and pasting, general 237 CSS attributes conversion 257 editing with BBEdit 351 external editors 350 formatting in existing documents 348 formatting preferences overview 343 formatting preferences, setting 344 formatting profile 530 inserting from Fireworks into Dreamweaver 282 570 Index HTML source code (continued) options 333 overview 321 reference 328 reference material 25 rewriting preferences 346 searching 258, 260 selecting in the Document window 154 structure 322 tag color preferences 343 tag searches 260 tag styles 248 tags, removing 342 updating Fireworks HTML placed in Dreamweaver 293 viewing with Code inspector 86 writing and editing 334 HTML Source option 260 HTML styles applying 245 clearing 246 creating 246–247 deleting 246 editing 247 modifying 247 New Style icon 247 removing from panel 246 using in other sites 248 viewing 245 HTML tags. See tags 322 HTTP Address field 103, 104 I Ignore Whitespace Differences option 260 image inspector 273 image maps creating client-side 273 hotspots 273 overview 273 selecting multiple hotspots 275 images aligning 241 applying behaviors to 280 as assets. See assets changing source file with timelines 430 editing 277 external image editors 277 images (continued) formats, supported 267 image maps 273 in tables 186 inserting 268 inserting in Layout view 174 preloading (behavior) 459 properties 269 resizing visually 272 restoring swapped (behavior) 468 scalability 272 shortcuts 553 swapping (behavior) 467 Import Table Data command 186 Import Word HTML command 150, 348 importing, Word HTML files 150 Indent and Outdent options (text Property inspector) 242 Indent option (Code Format preferences) 344 Indent Size option (Code Format preferences) 345 Index, Help 15 Insert E-Mail Link dialog box 364 Insert Image Field command 497 Insert Jump Menu dialog box 369 Insert Named Anchor dialog box 363 Insert Navigation Bar dialog box 372 Insert Tabular Data command 186 inserting ActiveX controls 316 assets 225 dates 235 Fireworks HTML into Dreamweaver 282 Fireworks images into Dreamweaver 282 Flash button objects 301 Flash movies 307 Flash Text objects 304 Generator objects 309 images 268 Java applets 318 media elements 297 rollover images 276 server-side includes 405 Shockwave movies 310 special characters 236 inserting assets. See assets inspectors image inspector 273 opening and closing with Launcher bar 77 Property inspector 82 shortcuts 557 See also panels installing Dreamweaver 12 integrating Dreamweaver with other applications 89 integrating with SourceSafe 127 integrating with WebDAV 127 interactivity 19 invalid tags, displaying 329 invisible elements comments 327 preferences 156 scripts 335 selecting 154 showing and hiding 156 italics 239 J Java applets inserting 297, 318 overview 318 properties 318 resizing 272 JavaScript actions 436 alerts 458 executing 446 extending Dreamweaver 536 files 150 inserting scripts 335 JavaScript debugger 473 logical errors 476 running 473 setting breakpoints 477 step in, step out, step over 478 syntax errors 475 variable list 479 warning box 474 watching variables 479 window 476 JavaServer Pages (JSP) 542 JPEG images as tracing image 158 uses for 267 Index 571 JS debugger. See JavaScript debugger JSP (JavaServer Pages) 542 Jump Menu action 455 Jump Menu Go action 456 jump menus adding menu items 369 changing menu items 370 creating a selection prompt for 369 editing 455 Go buttons 456 Go buttons, adding automatically 369 K Keyboard Shortcut Editor 90 keyboard shortcuts 545–558 editing 90 editing, in menus.xml file 521 keyframes creating 427 overview 425 L Language script property 336 Launch and Edit preferences 287 Launcher Launcher bar 77 Launcher and Launcher bar customizing 77 default buttons 74 launching Fireworks from Dreamweaver. See Dreamweaver and Fireworks integration layers 407–434 activating 416 aligning 415 anchor points 156 changing stacking order of 420 changing visibility with behaviors 465 changing visibility with Layers panel 420 converting for 3.0 browsers 424 converting to tables 422 creating 409 draggable 453 drawing multiple 409 in table design 422 inserting 409 manipulating 412 572 Index layers (continued) markers, displaying 409 moving 415 nesting 411 overview 407 positioning 417 preferences 412 preventing overlap 423 properties 417 properties for multiple 419 resizing 414 selecting 413 selecting multiple 419 shortcuts 552 snapping to grid 416 visibility 420 Layers panel 410 layout cells 169 alignment 177 bg color 177 clearing heights 175 drawing 170 formatting 177 highlight 182 moving 176 No Wrap 177 preferences 182 resizing 176 selecting 176 layout tables 169 alignment 178 background 182 bg color 178 cell padding 178 cell spacing 178 clearing heights 178 drawing 170 formatting 178 Make Widths Consistent 178 moving 176 nested 173 outline 182 preferences 182 Remove all Spacers 178 Remove Nesting 178 resizing 176 selecting 176 Layout view 167–182 about layout cells and tables 169 adding content to 174 autoinsert spacers 182 autostretch 179 background 182 cell highlight 182 cell padding 178 cell spacing 178 Clear Height attributes 178 clearing cell heights 175 column header menu 180 drawing layout cells and tables 170 fixed width 179 formatting layout cells 177 formatting layout tables 178 grid 174 Make Widths Consistent 178 moving layout cells and tables 176 nested layout tables 173 overview 167 preferences 182 Remove All Spacers 178 Remove Nesting 178 resizing layout cells and tables 176 selecting layout cells and tables 176 setting width 179 spacer image preferences 181 spacer images 181 switching into 167 table outline 182 layout, planning 100 See alsoLayout view, templates learning Dreamweaver 20 Left alignment (image Property inspector) 271 lessons overview 13 library items 396, 403 adding to pages 398, 404 as assets. See assets changing highlight color 397 creating 396 deleting 400 editing 398, 404 editing behaviors in 401 exporting from Fireworks 285 making editable in documents 401 overview 396 library items (continued) preferences 397 properties 403 Line Breaks option (Code Format preferences) 345 Link Checker dialog box 507 Link Color option (Page Properties) 153 Link External Style Sheet dialog box 251 Link image property 270 Link option 242 Link to Existing File command 119 Link to New File command 120 linked documents, opening 508 linking anchors 362 documents 359 to document using point-to-file icon 360 to external CSS style sheet 251 to named anchor using point-to-file icon 363 links applying to selection 226 cache file 366 changing frames with 218 changing sitewide 368 checking 506 fixing 507 opening source 367 Relative to Document 359 Relative to Site Root 359 removing 367 shortcuts 553 site map 367 specifying 242 targeting 358 testing 505 to anchors 362 to document 358 to style sheets 250 updating 366 List Item option 242 lists, creating 238 Load Query button 263 Local Files option 114 local root folder 102 Local Root Folder field 103, 104 local sites. See sites 102 locked regions, clicking in 385 logical errors in JavaScript code 476 Index 573 Loop option 425 looping timelines 429 Low Src image property 270 M Mac OS color palette 87 Macromedia Director, creating Shockwave movies with 310 macros (creating commands) 165 managing assets. See assets managing links 366 Map Name Field image property 270 map tag 273 markers for invisible elements 156 Match Case option 260 media elements inserting 297 parameters 319 menus, customizing 517 menus.xml file, syntax 522 Merge Cells command 198 Microsoft Excel files, importing 186 Microsoft Word files, opening 150 Microsoft Word HTML cleaning up 348 importing 348 Middle alignment (image Property inspector) 271 Mini-Launcher. See Launcher and Launcher bar 74 Missing Alt Text 510 modifying, page properties 152 monitor size, resizing pages to fit 75 movies, inserting 297 MPEG movies as assets. See assets multimedia. See media N Name property (image Property inspector) 269 Named Anchor command 363 named anchors, creating 362 navigation bar adding images to 372 creating 371 displaying horizontally in a page 373 displaying vertically in a page 373 image states 371 inserting in a table 373 modifying elements 374 574 Index nesting 412 frames 208 layers 411 Netscape 4 layer compatibility 412 Netscape Navigator plugins playing in Document window 315 properties 314 troubleshooting 315 Never Rewrite HTML In Files with Extensions option (Code Rewriting preferences) 346 New command 150 new features in Dreamweaver 22 New From Template command 151 New from Template command 389 NFS servers 124 NOFRAMES content 219 null links changing 368 creating 365 O objects adding Design Notes 136 adding to forms 485 checkboxes and radio buttons 491 creating 516 inserting 234 inserting with Objects panel 80 shortcuts 556 Objects panel categories 80 customizing 515 docking 82 overview 80 preferences 81 reloading 515 onBlur event 470 Open Attached Template command 391 Open Browser Window action 456 Open command 150 Open Linked Page command 508 Open Style Sheet icon 250, 251 opening documents 150 file types other than HTML by default 514 text files 150 Opening linked documents 508 opening non-HTML files 338 preferences 338 opening Word HTML files 150 Optimize Image in Fireworks command 290 Ordered List option 242 orphaned files 506 Other Keywords option (Code Colors preferences) 344 overlapping tags 329 Override Case Of option (Code Format preferences) 345 overview of Dreamweaver 11 P Package Manager 93 page layout. See Layout view, templates page properties, titles, changing 152 page size, resizing to fit monitor 75 pages background image 153 changing title 152 color 153 default text colors 153 design 100 Design Notes, using with 134 download time, estimated 509 previewing in browsers 504 properties, and templates 379 size 509 palettes, color 87 panels Behaviors panel 436 Code inspector 86 docking 82 History panel 84 Launcher bar 77 Objects panel 80 opening and closing with Launcher bar 77 setting floating preferences 83 shortcuts 557 paragraph tags 240 Parameters dialog box 319 Paste as Text command 234 pasting history steps 164 paths absolute 354 document-relative 355 root-relative 357 personal spelling dictionary 258 photographs 267 PHP Hypertext Preprocessor 542 pixels, transparent, in background 153 planning, design 100 Play Sound action 458 Play Timeline action 469 playback head 425 playing Flash objects 303 plugins checking 449 detecting 503 Netscape Navigator 314 playing in Document window 315 playing shortcuts 555 resizing 272 troubleshooting 315 PNG images as tracing image 158 uses for 267 pop-up menu, creating 495 Popup Message action 458 preferences Code Colors 343 Code Format 344 Code Rewriting 346 dictionary for spell checking 258 External Editors 298 File Types/Editors 299 floating panels 83 Fonts/Encoding 89 General 88 Invisible Elements 156 Launch and Edit 287 Layers 412 Layout View 182 libraries 397 Objects panel 81 overview 88 Panels 83 Preview in Browser 505 Preview Using Local Server (root-relative links) 357 Quick Tag Editor 342 Site 110 Status Bar 76 template 383 updating links 366 Index 575 Preload Images action 459 Prevent Layer Overlaps command 423 Preview in Browser command 504 Preview Using Local Server command 357 previewing in browsers overview 504 shortcuts 553, 554 primary browser 505 processing forms 499 profiles browsers 532 HTML source format 530 properties ActiveX controls 316 changing with behaviors 446 column, row, and cell 191 displaying 82 document, setting 152 Flash movies 308 frame 212 frameset 214 hotspots 274 image 269 Java applets 318 layer 417 layout cell 177 layout tables 178 multiple layer 419 Shockwave movies 310 table 190 Property inspector ActiveX control properties 316 displaying 82 expanding 82 fixing broken links 508 Flash movie properties 308 hotspots 274 images 269 Java applet properties 318 library item properties 403 Netscape Navigator plugin properties 314 Shockwave movie properties 310 proportion, maintaining 272 publishing sites 501 Put command 144 Put Newer Files to Remote option 146 putting files on a remote server 144 576 Index Q Quick Tag Editor attributes hints menu 341 opening 338 overview 338 preferences 342 QuickTime movies as assets. See assets inserting 313 R radio buttons 491 Record Path of Layer command 428 recording commands 166 Redefine HTML Tag option 252 Redundant Nested Tags 510 reference material 25 Reference panel 328 Refresh image property 270 Refresh Local File List Automatically option 103, 104 refreshing, Site list (Assets panel) 224 regions, locked, clicking in 385 regular expressions 264 reloading extensions 515 Remote Files option 114 Removable Empty Tags 511 Remove all Word Specific Markup option 349 Remove Dreamweaver HTML Comments option 347 Remove Empty Tags option 347 Remove Extra Closing Tags option (Code Rewriting preferences) 346 Remove Frame command 427 Remove Non-Dreamweaver HTML Comments option 347 Remove Redundant Nested Tags option 347 Remove Specific Tag(s) option 347 Remove Timeline command 431 removing frames from a timeline 429 repeating steps 160 Replay button 161 Reports, Checked Out By 141 reports 141 creating 510 testing a site with 510 Workflow 141 Reserved Keywords option (Code Colors preferences) 343 Reset Origin command 157 Reset Position command 158 resizing frames 216 handles 272 layers 414 layout cells and tables 176 page elements 272 table cells 194 resizing Fireworks images from Dreamweaver 291 resources for information on Web technologies 25 reusing library items 398 searches 263 templates 388 Right alignment (image Property inspector) 271 roadmap (where to start) 20 Rollover Image text field 276 rollovers 276 creating 276 making a link 276 testing 277 root folder local 102 remote 126 root-relative paths about 357 Preview Using Local Server preference 357 setting 359 Roundtrip HTML 329 Rows option (Insert Table) 184 rulers 157 S Save All Frames command 212 Save as Template command 377 Save command 151 Save Frame As command 212 Save Frame command 212 Save Frameset As command 211 Save Frameset command 211 Save Query button 263 saving documents 151 files in frames and framesets 211 searches 263 script links changing 368 creating 365 scripts as assets. See assets balanced braces 337 editing 336 editing external 335 entering 335 showing in Document 156 viewing functions 337 scrolling lists 494 Search For options 259 searching Dreamweaver Help 15 for files 258 HTML tags and attributes 260 regular expressions 264 saving search patterns 263 shortcuts 550 text between specific tags 262 text in HTML source 260 text within files 258 secondary browser 505 Select Newer Local command 146 Select Newer Remote command 146 selecting frames and framesets 208 layers 413 layout cells and tables 176 objects in the Document window 154 Server Access options 124 servers access options 124 AppleTalk 124 defining remote sites 124 NFS 124 setup troubleshooting 130 server-side image maps 273 server-side includes 404–406 editing 406 inserting 405 overview 404 Set as Home Page command 120 Set Background Color option (Clean Up Word HTML) 349 Set Color Scheme command 153 Index 577 Set Nav Bar Image action 460 Set Text of Frame action 461 Set Text of Layer action 462 Set Text of Status Bar action 463 Set Text of Text Field action 464 setting breakpoints 477 setting document properties 152 Shockwave movies as assets. See assets controlling 450 inserting 310 overview 310 properties 310 resizing 272 shortcut menus. See context menus shortcuts, keyboard. See keyboard shortcuts Show Launcher bar in Status Bar option 76 Show Layout Table Tabs option 168 Show Log on Completion option 347 Show Page Titles in site map 120 Show-Hide Layers action 465 showing invisible elements 156 Site Files view 115 Site list, refreshing 224 site maps adding files to a site 119 changing links in 367 collapsing a branch 122 Display Dependent Files option 121 editing pages 119 expanding a branch 122 Link to Existing File command 119 Link to New File command 120 links 367 marking files hidden 121 Refresh Local command 121 removing links in 367 renaming pages in 120 saving as an image file 122 selecting multiple pages in 119 Set as Home Page command 120 shortcuts 555 show hidden files 121 Show Page Titles option 120 showing dependent files in 121 updating after changes 121 viewing 113 viewing a branch of 122 578 Index Site Name field 103, 104 site planning 95 assets 101 audience 95 goals 95 structure 98 Site preferences 110 site reports 141 site root relative paths. See root-relative paths Site window basics 112 changing the display 114 Get command 143 overview 108 Put command 144 searching for files 123 searching for text 258 Site Files view 109 Site Map view 109 site maps 113 toolbar options 108 viewing local sites 112 sites adding files and folders 115 browser compatibility 97, 502 cache 366 changing display 114 changing links sitewide 368 checking files in and out 131 checking links 506 create new 102 Design Notes, using with 134 edit existing 104 editing remote 105 fixing broken links 507 large, assets in 229 local versus remote 95 local, associating a remote server with 124 local, creating 102 local, locating files in 123 local, root folder 102 local, viewing 112 previewing in browsers 504 publishing 501 reference material 25 remote, access options 124 remote, defining 124 remote, locating files in 123 sites (continued) remote, root folder 126 remote, setting up 123 remote, setup troubleshooting 130 removing from site list 106 reports, running 141 searching for files in 258 selecting updated files 115 shortcuts 554 structure and navigation 107 testing 501 viewing 112 Size option (font) 242 slider controls, creating 451 Snap to Web Safe color palette. 87 sound 311–313 adding to a page 311 playing 458 source format profile 530 Source script property 336 SourceFormat.txt file 343 SourceSafe integration 127 spacer image 182 spacer images 181 preferences 181 special characters inserting 236 overview 236 Special Characters options (Code Rewriting preferences) 346 spelling checking 258 dictionaries, editing 258 Split Cells command 199 Split Frame commands 206 Src image property 269 stacking order changing with timelines 430 layers 420 starting out 20 status bar overview 74 preferences 76 setting text (behavior) 463 Window Size pop-up menu 74 stepping through code 478 Stop Timeline action 469 Strikethrough (Default Color) button 87 Strings option (Code Colors preferences) 344 style sheets editing external style sheets 252 external 250 overview 248 See also styles Style submenu 239 styles 248 applying custom styles 254 conflicting 255 converting to HTML 256 creating 252 CSS to HTML markup conversion table 257 HTML 244 in templates 388 See also style sheets Submit buttons 497 Swap Image action 467 Swap Image Restore action 468 swatches, color 87 synchronizing local and remote sites 146 syntax errors 475 syntax of menus.xml 522 System Color button 87 system color picker 87 system requirements Macintosh 12 Windows 12 T Tab Size option 345 table border colors 191 width 191 table cells background color, adding 192 background image, adding 192 copying and pasting 199 formatting 191 header cells, designating 192 merging 198 splitting 198 See also layout cells, tables Table of Contents, Help 15 Table Rows and Columns option (Code Format preferences) 344 Index 579 tables 498 adding and removing rows and columns 196 adding background color to 191 adding background images to 191 adding borders to 190 adding content to 185 adjusting rows and columns 194 aligning 192 cells, splitting 199 changing column width 194 clearing cell width and height 195 columns, rows, and cells 191 converting from layers 422 creating 184 editing Fireworks tables from Dreamweaver 289 formatting 189 HTML tags 189 importing 186 merging cells 198 nesting 197 No Wrap option 192 overview 183 preset designs for 193 properties 190 resizing 194 See also layout view See layout tables selecting elements 187 shortcuts 551 sorting 201 See also columns, rows, and cells tabular data, importing 186 Tag Default option (Code Colors preferences) 343 Tag Specific option (Code Colors preferences) 344 tags applying 240 ASP 352 body 159 body 323 CFML 352 editing 338 head 323 HTML 322 in browser profiles 532 invalid 329 menus.xml syntax 522 overlapping 329 580 Index tags (continued) removing 342 searches 260 selecting 154 specifications 538 table 189 tagspec 538 text formatting 326 third-party, customizing 537 wrapping 338 XML 330 Target image property 270 Target option 242 targeting browsers browser profiles 532 converting file to 3.0 compatible 424 shortcuts 553, 554 targeting frames to _blank 218 _parent 218 _self 218 _top 218 targeting links in documents 359 opening document in a new window 359 templates 375–395 applying to document 226 applying to existing document 389 as assets. See assets changing highlight colors 383 clicking in locked regions 385 creating 377 creating Flash button templates 306 creating new documents with 151, 389 defining editable regions 382 detaching document from 391 documents based on, creating 388 editable versus locked regions 381 editing 377, 378 finding editable regions 390 making region noneditable 387 modifying 391 overview 375 page properties 379 preferences 383 renaming 378 shortcuts 555 templates (continued) Templates folder 377 using behaviors 388 using styles 388 using timelines 388 viewing regions 384 XML 392 testing sites 501 text adding to documents 234 alignment 241 changing color of 226, 240 changing font combinations 242 color, changing 240 default color in pages 153 editing shortcuts 549 external editors. See external editors formating shortcuts 550 formatting 233 formatting tags 326 formatting with HTML styles 244 searching within documents 258 Text Color option 242 Text Color option (Page Properties) 153 text editors, files created by 150 text editors. See external editors text fields, setting text with behaviors 464 text files, opening 150 Text option (Code Colors preferences) 343 text-based HTML editors. See external editors TextTop alignment (image Property inspector) 271 third-party tags avoiding rewriting 544 customizing 537 timelines adding and removing frames 429 adding objects to 427 animation tips 433 attaching a behavior 442 changing image source file 430 changing layer properties 430 complex paths 428 controlling with behaviors 434 creating 427 in templates 388 keyframes 427 looping 429 timelines (continued) modifying 429 multiple 431 playback head 425 playing and stopping using behaviors 469 playing automatically 429 shortcuts 552 Timelines panel 425 titles, changing 152 toolbar, document titles, changing 152 Top alignment (image Property inspector) 271 tracing images 158 transferring files, troubleshooting 144 transparent pixels in background 153 troubleshooting clicking in locked regions 385 Navigator plugins 315 transferring files 144 typographical conventions 22 U underline 239 Unmark Editable Region command 387 Unordered List option 242 unordered lists, creating 237 Untitled Documents 511 Update Current Page command 391, 399 Update HTML command 293 Update Pages command 392 updating links 366 uploading files 144 URLs applying to selection 226 as assets. See assets creating URL assets 231 URLs. See paths Use Firewall option 125 Use FTP option 124 Use Local/Network option 124 Use None option 124 Use option (Code Format preferences) 344 Use Passive FTP option 125 Use Regular Expressions option 260 usemap attribute 273 Using Dreamweaver book 14 Using Dreamweaver with Visual SourceSafe 128 Using Reports to test a site 509 Index 581 V V Space and H Space image properties 270 Validate Form action 470 variable list 479 VBScript 335 viewing arranging views 332 Code view and Design view 331 editable and locked HTML in templates 386 editable and locked regions in templates 384 head content 159 invisible elements 156 sites 112 Visited Links color option (Page Properties) 153 visual guides overview 157 rulers 157 tracing images 158 Visual SourceSafe, integration with Dreamweaver 128 W W and H image properties 269 Warn When Fixing or Removing Tags option (Code Rewriting preferences) 346 Web design, levels of experience in 20 Web photo albums, creating 294 Web Server Info 124 Web servers. See servers WebDAV integration 127 Window Size pop-up menu 74 windows shortcuts 557 See also inspectors, panels Windows OS color palette 87 Word HTML. See Microsoft Word HTML word processors, files created by 150 work area 72 Workflow reports 141 writing code (Code view or Code inspector) 334 582 Index X XML in templates 392 menus.xml file 522 overview 394 tag notations when exporting 395 tags 330 tagspec tag 538 Z Z-Index option (for layers), changing stacking order 420
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.3 Linearized : No Create Date : 2000:11:06 12:55:52 Producer : Acrobat Distiller 4.05 for Macintosh Author : cbasmajian Title : 000_UsingDreamweaver.book Creator : FrameMaker 5.5.6 Modify Date : 2000:11:06 13:41:19-08:00 Page Count : 582 Page Mode : UseOutlinesEXIF Metadata provided by EXIF.tools