Tải bản đầy đủ (.pdf) (80 trang)

dreamweaver cs5 all in one for dummies

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.91 MB, 80 trang )

Sue Jenkins
Richard Wagner
9

IN
1
BOOKS
BOOKS
• Getting Started
• Mastering the Basics
• Working Like the Pros
• Energizing Your Site
• Publishing Your Site
• Working Collaboratively
• Building Web Applications
• Making Pages Dynamic
• Developing Applications Rapidly
Dreamweaver
®
CS5
ALL-IN-ONE
Making Everything Easier!

Open the book and find:
• How to plan and design a Web site
• Advice on working with Cascading
Style Sheets
• Steps for adding Flash
®
content,
movies, and audio


• Tips for building forms and
organizing data with tables
• Ways to add interactivity with
drop-down menus and rollovers
• Techniques for testing your site
before it’s published
• How to set up and manage a
Contribute site
• Secrets for building Web
applications
Sue Jenkins is a Web and graphic designer, writer, and teacher. She is the
host of three software training DVDs and is the author of several books
on Web and graphic design. Richard Wagner is an experienced Web
designer, developer, and author of more than a dozen Web-related books.
$34.99 US / $41.99 CN / £24.99 UK
ISBN 978-0-470-61077-0
Internet/Web Site Design
Go to Dummies.com
®
for videos, step-by-step examples,
how-to articles, or to shop!
Your one-stop guide to designing,
developing, and maintaining
high-impact Web sites
Whether you’re a seasoned pro or a Web design
newbie, here’s just what you need to get up to speed on
Dreamweaver CS5. Each minibook covers a particular aspect
of Dreamweaver, so whether you want to learn more about
mastering the basics and designing effective Web pages or
configuring database connections and working with Spry

Effects, it’s all here!
• Learn the landscape — get familiar with the workspace, use the
menus, understand the panels and Properties inspector, and set
preferences
• Conquer the basics — create documents, add and format text,
insert graphics, create rollover buttons, and make links to other
pages
• Become a pro — style your pages with Cascading Style Sheets,
build sites with Dreamweaver templates, and use Library items
• Add some zing — use layers to create sophisticated Web layouts,
add interactivity with JavaScript
®
, and work with Spry Effects
and Spry Widgets
• Keep it clean — review source formatting and clean up your code
to avoid errors when publishing your site
• Collaborate — enable collaborative tools such as Design Notes,
Check In/Check Out, Contribute®, and Business Catalyst
• Go dynamic — enable your pages to interact with databases,
build dynamic forms, and work with ColdFusion® components
• Some geeky stuff — build master and detail pages, create search
and results pages, and develop record update and delete pages
Getting Started
Mastering the Basics
Working Like the Pros
Energizing Your Site
Publishing Your Site
Working Collaboratively
Building Web
Applications

Making Pages Dynamic
Developing
Applications Rapidly
Dreamweaver
®
CS5
ALL-IN-ONE
Jenkins
Wagner
spine=1.73”
spine=1.73”
Start with FREE Cheat Sheets
Cheat Sheets include
• Checklists
• Charts
• Common Instructions
• And Other Good Stuff!
Get Smart at Dummies.com
Dummies.com makes your life easier with 1,000s
of answers on everything from removing wallpaper
to using the latest version of Windows.
Check out our
• Videos
• Illustrated Articles
• Step-by-Step Instructions
Plus, each month you can win valuable prizes by entering
our Dummies.com sweepstakes. *
Want a weekly dose of Dummies? Sign up for Newsletters on
• Digital Photography
• Microsoft Windows & Office

• Personal Finance & Investing
• Health & Wellness
• Computing, iPods & Cell Phones
• eBay
• Internet
• Food, Home & Garden
Find out “HOW” at Dummies.com
*Sweepstakes not currently available in all countries; visit Dummies.com for official rules.
Get More and Do More at Dummies.com
®
To access the Cheat Sheet created specifically for this book, go to
www.dummies.com/cheatsheet/dreamweavercs5aio
Mobile Apps
There’s a Dummies App for This and That
With more than 200 million books in print and over 1,600 unique
titles, Dummies is a global leader in how-to information. Now
you can get the same great Dummies information in an App. With
topics such as Wine, Spanish, Digital Photography, Certification,
and more, you’ll have instant access to the topics you need to
know in a format you can trust.
To get information on all our Dummies apps, visit the following:
www.Dummies.com/go/mobile from your computer.
www.Dummies.com/go/iphone/apps from your phone.
Dreamweaver
®
CS5
ALL-IN-ONE
FOR
DUMmIES


01_610770-ffirs.indd i01_610770-ffirs.indd i 5/6/10 1:03 PM5/6/10 1:03 PM
01_610770-ffirs.indd ii01_610770-ffirs.indd ii 5/6/10 1:03 PM5/6/10 1:03 PM
by Sue Jenkins and Richard Wagner
Dreamweaver
®
CS5
ALL-IN-ONE
FOR
DUMmIES

01_610770-ffirs.indd iii01_610770-ffirs.indd iii 5/6/10 1:03 PM5/6/10 1:03 PM
Dreamweaver
®
CS5 All-in-One For Dummies
®
Published by
Wiley Publishing, Inc.
111 River Street
Hoboken, NJ 07030-5774
www.wiley.com
Copyright © 2010 by Wiley Publishing, Inc., Indianapolis, Indiana
Published by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permit-
ted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written
permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the
Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.
Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley
& Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://

www.wiley.com/go/permissions.
Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the
Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, Making Everything
Easier,
and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/
or its af liates in the United States and other countries, and may not be used without written permission.
Dreamweaver is a registered trademark of Adobe Systems Incorporated. All other trademarks are the
property of their respective owners. Wiley Publishing, Inc. is not associated with any product or vendor
mentioned in this book.
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO
REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF
THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITH-
OUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE
CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES
CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE
UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR
OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF
A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE
AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZA-
TION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE
OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES
THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT
MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS
WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND
WHEN IT IS READ.
For general information on our other products and services, please contact our Customer Care
Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002.
For technical support, please visit www.wiley.com/techsupport.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may
not be available in electronic books.

Library of Congress Control Number: 2010926841
ISBN: 978-0-470-61077-0
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
01_610770-ffirs.indd iv01_610770-ffirs.indd iv 5/6/10 1:03 PM5/6/10 1:03 PM
About the Authors
Sue Jenkins is a Web designer, graphic designer, illustrator, photographer,
teacher, writer, and the owner of Luckychair (www.luckychair.com), a
professional design studio serving companies across the United States since
1997. Sue is the author of several books on design, including Web Design All-in-
One For Dummies, Web Design: The L-Line, The Express Line to Learning, How
To Do Everything Illustrator CS4, and the upcoming Smashing Photoshop: 100
Professional Techniques. She can also be seen as the software instructor in
four of ClassOnDemand’s (www.classondemand.com) Adobe Training DVDs:
Dreamweaver for Designers (winner of a 2007 Bronze Telly Award), Designer’s
Guide to Photoshop, Designer’s Guide to Illustrator (winner of a 2009 Annual
Communicator Award of Distinction), and Fundamentals of Photoshop Elements
(winner of a 2009 DV Magazine Award of Excellence). In addition, Sue is an
Adobe Certi ed Expert and Adobe Certi ed Instructor and teaches three-day
courses in Dreamweaver, Illustrator, and Photoshop at Noble Desktop in New
York City. Sue lives with her husband and son in Pennsylvania.
Richard Wagner is a Senior Developer at Maark, LLC as well as author
of several Web-related books, including Building Facebook Applications
For Dummies, Professional iPhone and iPod touch Programming, XSLT For
Dummies, Creating Web Pages All-in-One For Dummies, XML All-in-One For
Dummies, Web Design Before & After Makeovers, and JavaScript Unleashed
(1st and 2nd editions). Previously, Richard was vice president of product
development at NetObjects. He was also the inventor and chief architect of
the award-winning NetObjects ScriptBuilder. A versatile author with a wide
range of interests, he is also the author of The Expeditionary Man and The

Myth of Happiness.
01_610770-ffirs.indd v01_610770-ffirs.indd v 5/6/10 1:03 PM5/6/10 1:03 PM
01_610770-ffirs.indd vi01_610770-ffirs.indd vi 5/6/10 1:03 PM5/6/10 1:03 PM
Dedication
To Phil and Kyle for their cooperation, time, love, and humor.
— Sue Jenkins
Authors’ Acknowledgments
A hearty round of thanks go out to several people, including my coauthor,
Rich Wagner, my agent, Matt Wagner, senior acquisitions editor Bob
Woerner, project editor Susan Pink, technical editor Jon McFarland, and
everyone in composition services at Wiley who helped with the production of
this edition.
— Sue Jenkins
I would like to thank Susan Pink for her excellent job of managing this project. Thanks
also to Jon McFarland for his technical insights to ensure the accuracy of the book.
— Richard Wagner
01_610770-ffirs.indd vii01_610770-ffirs.indd vii 5/6/10 1:03 PM5/6/10 1:03 PM
Publisher’s Acknowledgments
We’re proud of this book; please send us your comments at .
For other comments, please contact our Customer Care Department within the U.S. at 877-762-2974,
outside the U.S. at 317-572-3993, or fax 317-572-4002.
Some of the people who helped bring this book to market include the following:
Acquisitions and Editorial
Project Editor: Susan Pink
Acquisitions Editor: Bob Woerner
Copy Editor: Susan Pink
Technical Editor: Jon McFarland
Editorial Manager: Jodi Jensen
Editorial Assistant: Amanda Graham
Sr. Editorial Assistant: Cherie Case

Cartoons: Rich Tennant
(www.the5thwave.com)
Composition Services
Project Coordinator: Sheree Montgomery
Layout and Graphics: Ana Carrillo,
Joyce Haughey
Proofreaders: Melissa Cossell,
The Well-Chosen Word
Indexer: Broccoli Information Mgt.
Publishing and Editorial for Technology Dummies
Richard Swadley, Vice President and Executive Group Publisher
Andy Cummings, Vice President and Publisher
Mary Bednarek, Executive Acquisitions Director
Mary C. Corder, Editorial Director
Publishing for Consumer Dummies
Diane Graves Steele, Vice President and Publisher
Composition Services
Debbie Stailey, Director of Composition Services
01_610770-ffirs.indd viii01_610770-ffirs.indd viii 5/6/10 1:03 PM5/6/10 1:03 PM
Contents at a Glance
Introduction 1
Book I: Getting Started 9
Chapter 1: Cruising Around the Dreamweaver CS5 Workspace 11
Chapter 2: Planning and Designing Your Site 35
Chapter 3: Creating and Managing Sites 47
Book II Mastering the Basics 59
Chapter 1: Creating Documents 61
Chapter 2: Working with Text 75
Chapter 3: Inserting Graphics 95
Chapter 4: Making Links with Text and Images 113

Chapter 5: Adding Flash, Movies, Sound, and More 127
Chapter 6: Organizing Data with Tables 151
Chapter 7: Building Fabulous Forms 169
Book III: Working Like the Pros 199
Chapter 1: Looking Good with Cascading Style Sheets (CSS) 201
Chapter 2: Building Sites with Templates 249
Chapter 3: Using Library Items and Server-Side Includes 281
Chapter 4: Creating Code Snippets and History Panel Commands 299
Chapter 5: Integrating Dreamweaver with Fireworks 319
Chapter 6: Dreamweaver Cross-Application Integration 337
Book IV: Energizing Your Site 357
Chapter 1: Working with Layers 359
Chapter 2: Jazzing Up Pages with JavaScript Behaviors and Spry Widgets 383
Chapter 3: Designing Pages with Frames 433
Chapter 4: Making Your Pages XHTML-Compliant 463
Book V: Publishing Your Site 473
Chapter 1: Using Reports to Test Your Site before Publishing 475
Chapter 2: Keeping Your Code Clean 501
Chapter 3: Preparing to Publish Your Files Online 519
Chapter 4: Publishing Your Web Pages Online 535
02_610770-ftoc.indd ix02_610770-ftoc.indd ix 5/6/10 1:03 PM5/6/10 1:03 PM
Book VI: Working Collaboratively 549
Chapter 1: Working Ef ciently with a Team 551
Chapter 2: Setting Up and Connecting to a Contribute Site 565
Chapter 3: Managing a Contribute Site 581
Chapter 4: Collaborating Online with InContext Editing 591
Book VII: Building Web Applications 601
Chapter 1: Preparing to Build Web Applications 603
Chapter 2: Con guring MySQL Database Connections for PHP 617
Chapter 3: Con guring ASP Database Connections 625

Chapter 4: Con guring ASP.NET Database Connections 635
Chapter 5: Con guring JSP Database Connections 643
Chapter 6: Con guring ColdFusion Database Connections 651
Chapter 7: Dealing with Database Problems and Other Gotchas 661
Book VIII: Making Pages Dynamic 671
Chapter 1: Preparing Dynamic Content Sources 673
Chapter 2: Using Dynamic Content in Your Web Pages 685
Chapter 3: Previewing and Testing Your Dynamic Pages 699
Chapter 4: Building Dynamic Forms 709
Chapter 5: Advanced Dynamic Data Presentation 717
Book IX: Developing Applications Rapidly 729
Chapter 1: Building Master and Detail Pages 731
Chapter 2: Creating Search and Results Pages 747
Chapter 3: Building Record Insert Pages and Restricting Site Access 757
Chapter 4: Developing Record Update and Delete Pages 771
Index 791
02_610770-ftoc.indd x02_610770-ftoc.indd x 5/6/10 1:03 PM5/6/10 1:03 PM
Table of Contents
Introduction 1
About This Book 2
Conventions Used in This Book 2
What You Don’t Have to Read 3
Assumptions About You 3
How This Book Is Organized 3
Book I: Getting Started 3
Book II: Mastering the Basics 3
Book III: Working Like the Pros 4
Book IV: Energizing Your Site 4
Book V: Publishing Your Site 4
Book VI: Working Collaboratively 4

Book VII: Building Web Applications 4
Book VIII: Making Pages Dynamic 5
Book IX: Developing Applications Rapidly 5
Icons Used in This Book 5
Where to Go from Here 6
Book I: Getting Started 9
Chapter 1: Cruising Around the Dreamweaver CS5 Workspace. . . . .11
Choosing a Workspace Layout 11
Getting to Know the Dreamweaver Workspace 13
Exploring the Document Window 17
Document tab bar 17
Document and Browser Navigation toolbars 18
Rulers 22
Grids 22
Guides 23
Status bar 23
Understanding the Panels and the Properties Inspector 24
Understanding the panel dock 24
Accessing panels and panel groups 25
Using the Insert panel 26
Using the Properties inspector 27
Working with the Files panel 27
Customizing the Workspace 29
Setting Dreamweaver Preferences 30
02_610770-ftoc.indd xi02_610770-ftoc.indd xi 5/6/10 1:03 PM5/6/10 1:03 PM
Dreamweaver CS5 All-in-One For Dummies
xii
Finding Help 30
Using Dreamweaver Help (F1) 31
Working with the Reference panel 31

Visiting Adobe’s Dreamweaver support portal 32
Chapter 2: Planning and Designing Your Site. . . . . . . . . . . . . . . . . . . . .35
Understanding the Web Design Work ow 35
Knowing Your Audience 36
De ning the client’s expectations 36
Exploring the audience’s expectations 37
Examining Issues that Affect the Site Design 38
Balancing time, cost, and scope 38
Conveying your message 38
Web site design concepts 38
Considering resolution, optimization, and content 41
Planning the Site Layout 43
Designing and Optimizing Graphics 45
Chapter 3: Creating and Managing Sites. . . . . . . . . . . . . . . . . . . . . . . . .47
Understanding General Web Site Structure 47
Web site construction folders 47
Root-level organization 48
Setting Up a Managed Site 50
Servers 52
Version Control 53
Advanced Settings 53
Managing Multiple Sites 55
Duplicating sites 56
Exporting and importing sites 56
Removing sites from the Manage Sites list 57
Book II: Mastering the Basics 59
Chapter 1: Creating Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61
Creating a New Document 61
Saving Documents 65
Saving a copy of a  le 66

Saving multiple documents at once 67
Reverting to a previous version of a  le 67
Opening Existing Files 67
Setting Page Properties 68
Understanding Invisible Page Elements 69
Importing Tabular Data Files 72
Importing Word and Excel Files (Windows Only) 73
02_610770-ftoc.indd xii02_610770-ftoc.indd xii 5/6/10 1:03 PM5/6/10 1:03 PM
Table of Contents
xiii
Chapter 2: Working with Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75
Adding Text 75
Editing Text 76
Removing Text 77
Pasting Text from Another File 77
Setting Text Properties in the Properties Inspector 78
HTML Properties Inspector 80
CSS Properties Inspector 82
Creating Inline Styles 85
Inserting Special Characters 86
Creating Lists 87
Editing with the Find and Replace Tool 89
Searching for tags and attributes 89
Searching for text in speci c tags 91
Saving and reusing searches 93
Using regular expressions in your searches 94
Chapter 3: Inserting Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
Inserting Images in Your Web Page 96
Using the Insert panel 96
Using the Insert menu 98

Using the Assets panel 98
Using the Files panel 99
Editing, Deleting, and Moving Inserted Images 99
Using an Image Placeholder When a Graphic Isn’t Ready 99
Setting Image Attributes with the Properties Inspector 101
Naming your images 101
Specifying the width and height of images 102
Resizing and resetting images 102
Adding vertical or horizontal padding 103
Adding image links 103
Adjusting targets 103
Specifying the original  le 103
Adding image borders 104
Providing Alternate text 104
Aligning images 105
Using the image editing icons 106
Creating Interactive Images 107
Adding rollover images 107
Creating image maps 109
Inserting Fireworks HTML 111
Chapter 4: Making Links with Text and Images. . . . . . . . . . . . . . . . . .113
Understanding Hyperlinks 114
Creating Text Links 115
Making Image Links 117
Inserting E-Mail Links 118
02_610770-ftoc.indd xiii02_610770-ftoc.indd xiii 5/6/10 1:03 PM5/6/10 1:03 PM
Dreamweaver CS5 All-in-One For Dummies
xiv
Creating Named Anchor Links 119
Step 1: Place the named anchor 120

Step 2: Link to the named anchor 121
Creating Temporary Links 122
Setting Link Targets 123
Editing and Deleting Links 123
Editing links 123
Deleting links 124
Using the Tag Chooser 124
Coding Links by Hand 126
Chapter 5: Adding Flash, Movies, Sound, and More . . . . . . . . . . . . . .127
Flash Elements You Can Add to Your Web Site 127
Inserting Flash Movies (SWFs) 128
Adding a Flash movie to your page 128
Setting Flash movie attributes 131
Inserting Flash Video 132
Adding Shockwave Movies, Java Applets, and ActiveX Controls 137
Setting Shockwave movie properties 139
Setting Java applet properties 139
Setting ActiveX control properties 140
Adding Netscape Navigator Plug-ins 143
Setting Netscape Navigator plug-in properties 143
Playing Netscape Navigator plug-ins 144
Acceptable Sound File Formats 145
Adding Other Video and Sound to a Page 146
Linking versus embedding video 146
Linking versus embedding sound 147
Launching a Media External Editor 148
Chapter 6: Organizing Data with Tables . . . . . . . . . . . . . . . . . . . . . . . .151
Creating Tables 152
Inserting a basic table in your page 153
Turning On Table Visual Aids 155

Formatting Tables with the Properties Inspector 156
Merging and Splitting Rows and Columns 158
Merging cells 160
Splitting a cell 160
Setting Table Width and Heights 161
Adding Rows and Columns to a Table 161
Adding a row 161
Adding a column 162
Adding multiple rows or columns 162
Deleting rows and columns 163
Inserting Text and Images in Table Cells 163
Formatting Individual Table Cells 163
Changing Table Measurements from Pixels to Percentages 164
Importing Tabular Data 165
02_610770-ftoc.indd xiv02_610770-ftoc.indd xiv 5/6/10 1:03 PM5/6/10 1:03 PM
Table of Contents
xv
Sorting Information in a Table 166
Working with Tables Created by Other Programs 168
Chapter 7: Building Fabulous Forms. . . . . . . . . . . . . . . . . . . . . . . . . . . .169
Organizing Data in Your Form 170
Creating a Fabulous HTML Form 171
Adding and Labeling Form Fields 174
Text  elds 174
Hidden  elds 177
Check boxes 179
Radio buttons 181
Lists and menus 184
Jump menus 186
Image  elds 186

File upload  elds 187
Buttons 188
Label tags 190
Fieldset tags 191
Validating a Form with JavaScript 194
Validating a Form with Spry Assets 195
Book III: Working Like the Pros 199
Chapter 1: Looking Good with Cascading Style Sheets (CSS). . . . . .201
Understanding Cascading Style Sheets (CSS) 202
Exploring Different Style Sheet Types 204
Internal styles 204
External styles 206
Inline styles 207
Working with the CSS Styles Panel 208
All mode 209
Current mode 209
CSS Styles panel viewing icons 210
Understanding CSS Style Types 211
Class styles 212
ID styles (ID) 213
Tag rede ne styles 215
Compound styles 215
Adding a Style to a New or Existing Style Sheet 217
Attaching a Style Sheet to Your Document 220
Applying a Class Style 221
Editing a CSS Style 222
Editing in All mode 222
Editing in Current mode 224
Adding properties to a CSS style 224
Deleting a CSS Style 225

Enabling/Disabling CSS Properties 225
02_610770-ftoc.indd xv02_610770-ftoc.indd xv 5/6/10 1:03 PM5/6/10 1:03 PM
Dreamweaver CS5 All-in-One For Dummies
xvi
Exploring the CSS Rule De nition Dialog Box 228
Type properties 228
Background properties 230
Block properties 232
Box properties 234
Border properties 235
List properties 236
Positioning properties 237
Extensions properties 239
Renaming CSS Styles 240
Exporting Internal Styles to an External Style Sheet 242
Converting Inline Styles to CSS Rules 243
Using Design Time Style Sheets 245
Using the Code Navigator 246
Identifying Elements with CSS Inspect 247
Chapter 2: Building Sites with Templates. . . . . . . . . . . . . . . . . . . . . . .249
Introducing Templates 249
Creating a Template 250
Converting an HTML page into a template 251
Creating a new template from scratch 253
Working with Editable Regions 255
Creating editable regions 256
Removing editable regions 258
Renaming editable regions 259
Exporting a site without any template markup 260
Creating Optional and Optional Editable Regions 261

Creating optional regions 262
Creating optional editable regions 263
Modifying optional regions 264
Creating Repeating Regions and Tables 264
Creating repeating regions 265
Creating repeating tables 266
Creating Editable Tag Attributes 268
Changing editable tag attributes in template-based  les 270
Resetting an editable tag attribute to uneditable 270
Building Nested Templates 271
Creating nested templates 271
Modifying nested templates 272
Creating a New Document from a Template 273
Editing Templates and Updating Pages 275
Modifying a template and updating all the pages that use it 275
Selectively updating pages with the most recent version
of the template 276
Applying Templates to Pages 277
Detaching Templates from Pages 278
Managing Templates 279
Renaming a template 279
Deleting a template  le 280
02_610770-ftoc.indd xvi02_610770-ftoc.indd xvi 5/6/10 1:03 PM5/6/10 1:03 PM
Table of Contents
xvii
Chapter 3: Using Library Items and Server-Side Includes . . . . . . . . .281
Introducing Library Items 282
Creating Library Items 282
Creating a selection-based library item 283
Creating an empty library item 284

Inserting a Library Item in Your Document 285
Editing and Managing Library Items 287
Editing library items 287
Updating documents and sites that use library items 288
Renaming library items 289
Deleting library items 290
Detaching library items 290
Copying a library item from one site to another 291
Re-creating library items 291
Understanding Server-Side Includes 292
Creating and Inserting Server-Side Includes 293
Creating a server-side include 294
Inserting a server-side include 295
Editing Server-Side Includes 297
Chapter 4: Creating Code Snippets and History Panel Commands . . . 299
Understanding What Snippets Do 300
Using Dreamweaver’s Snippets 300
Creating Code Snippets 301
Creating a text snippet 302
Creating a JavaScript snippet 304
Creating a snippet with the Wrap Selection option 306
Creating a snippet with graphics 309
Working with Snippets 311
Sharing snippets 311
Editing snippets 312
Deleting snippets 312
Managing snippets 312
Creating History Panel Commands 313
Working with the History Panel 313
Recording commands 314

Playing commands 315
Renaming and deleting commands 317
Chapter 5: Integrating Dreamweaver with Fireworks. . . . . . . . . . . . . . .319
Preparing to Work with Dreamweaver and Fireworks 320
Setting Fireworks launch-and-edit preferences 320
Optimizing Dreamweaver for use with Fireworks 322
Using Fireworks Images in Dreamweaver 324
Inserting a Fireworks image in a Dreamweaver document 324
Replacing an image placeholder with a Fireworks graphic 325
Editing Images in Fireworks Tables 328
Optimizing Your Images in Dreamweaver 330
02_610770-ftoc.indd xvii02_610770-ftoc.indd xvii 5/6/10 1:03 PM5/6/10 1:03 PM
Dreamweaver CS5 All-in-One For Dummies
xviii
Using Fireworks HTML in Dreamweaver 331
Inserting Fireworks HTML in a Dreamweaver document 332
Pasting Fireworks HTML in a Dreamweaver document 333
Updating Fireworks HTML in a Dreamweaver Document 334
Editing Fireworks Pop-Up Menus 335
Roundtrip pop-up menu editing (Fireworks 8 and later) 335
Pop-up menu editing (Fireworks MX 2004 and earlier) 336
Chapter 6: Dreamweaver Cross-Application Integration . . . . . . . . . .337
Working with Adobe Flash 338
Inserting and Optimizing Photoshop Graphics 339
The Smart Objects work ow 340
The Copy/Paste work ow 344
Accessing and Using Adobe Bridge 346
Launching Bridge from Dreamweaver 347
Launching Dreamweaver from Bridge 347
Inserting a  le from Bridge 347

Integrating Your Files with Device Central 347
Setting Up Dreamweaver to Use Adobe AIR 349
Working with Adobe’s Creative Suites Extended Services (CSXS) 350
Share My Screen (ConnectNow) 351
Search for Help 352
Third-Party Flash-based Services 354
Managing Your CSXS Services 354
Book IV: Energizing Your Site 357
Chapter 1: Working with Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359
Understanding Layers 360
Creating Layers 363
Drawing an AP Div layer 363
Adding content to layers 364
Creating nested layers 364
Setting layer preferences 366
Managing AP Div Layers with the AP Elements Panel 367
Preventing layer overlap 368
Naming AP Div layers 369
Changing the z-index (stacking order) 369
Editing layer visibility 369
Selecting and Adjusting AP Div Layers 370
Selecting layers 371
Resizing and moving AP Div layers 372
Setting Layer Properties 372
Controlling Layer Style and Positioning with CSS 375
Controlling Layers with Behaviors 378
Converting AP Divs to Tables and Tables to AP Divs 378
Converting AP Div layers to a table 379
Converting tables to AP Div layers 381
02_610770-ftoc.indd xviii02_610770-ftoc.indd xviii 5/6/10 1:03 PM5/6/10 1:03 PM

Table of Contents
xix
Chapter 2: Jazzing Up Pages with JavaScript Behaviors
and Spry Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383
Understanding JavaScript Behaviors 385
Adding JavaScript to Your Page 386
Using Dreamweaver’s Default Behaviors 389
Using the Behaviors panel 389
Attaching a behavior 390
Changing and deleting behaviors 391
Updating old behaviors 392
Call JavaScript Behavior 393
Change Property Behavior 394
Check Plugin Behavior 395
Drag AP Element Behavior 397
Spry Effects Behaviors 400
Go to URL Behavior 403
Jump Menu and Jump Menu Go Behaviors 405
Creating a jump menu 405
Editing the Jump Menu behavior 407
Adding and removing a Go button 407
Open Browser Window Behavior 408
Popup Message Behavior 411
Preload Images Behavior 413
Set Text of Container Behavior 414
Set Text of Frame Behavior 416
Set Text of Status Bar Behavior 417
Set Text of Text Field Behavior 418
Show-Hide Elements Behavior 420
Swap Image Behavior 422

Swap Image Restore Behavior 424
Validate Form Behavior 425
Using Third-Party Behaviors 425
Visiting the Adobe Exchange Web site 425
Using the Extension Manager 426
Working with Spry Widgets 428
Chapter 3: Designing Pages with Frames . . . . . . . . . . . . . . . . . . . . . . .433
Understanding Frames 434
Creating Frames and Framesets 436
Using prede ned framesets to create a new  le 438
Displaying a  le in a prede ned frameset 439
Creating custom framesets 440
Adding, Removing, and Resizing Frames 441
Adding frames 441
Removing frames 442
Resizing a frame 442
Nested Framesets 442
Opening Pages in a Frame 444
02_610770-ftoc.indd xix02_610770-ftoc.indd xix 5/6/10 1:03 PM5/6/10 1:03 PM
Dreamweaver CS5 All-in-One For Dummies
xx
Saving Frames and Framesets 445
Saving all the  les in the frameset 445
Saving only the frameset  le 446
Saving an individual  le in a frame 447
Titling a Frameset 447
Setting the Background Color of a File in a Frame 448
Setting Frame Properties with the Properties Inspector 448
Setting frameset properties 449
Setting frame properties 451

Frame Accessibility Settings 452
Setting accessibility preferences 453
Adding or editing accessibility settings to a frame
with the Tag Editor 453
Targeting Frames with Links 454
Adding Noframes Content 455
Creating Floating Frames 457
Chapter 4: Making Your Pages XHTML-Compliant . . . . . . . . . . . . . . .463
Understanding the Bene ts of Using XHTML with Dreamweaver 463
Getting the Basics of XHTML Syntax 464
Discovering the strict rules you can’t live without 464
Taking advantage of strict and transitional rules 465
Handling Dreamweaver’s Automatic XHTML Code Compliance Tools 466
Making Sure Your Documents Follow XHTML Syntax 470
Creating a new XHTML document with Dreamweaver 470
Changing the default DTD 470
Transforming HTML document code into XHTML 471
Converting existing HTML  les to XHTML 472
Making sure your HTML  le can be converted to XHTML 472
Validating Your XHTML 472
Book V: Publishing Your Site 473
Chapter 1: Using Reports to Test Your Site before Publishing . . . . .475
Testing Your Site 476
Following general testing guidelines 476
Previewing your pages in multiple browsers 477
Setting the primary and secondary browsers 477
Previewing pages in multiple browsers locally 479
Previewing pages in Adobe BrowserLab 480
Setting download times and size 481
Examining the Results Panel 483

Searching Your Code for Tags and Attributes 484
Looking Up Reference Information 484
Validating Your Code 484
Using the Validation tab 485
Setting Validation tab preferences 486
02_610770-ftoc.indd xx02_610770-ftoc.indd xx 5/6/10 1:03 PM5/6/10 1:03 PM
Table of Contents
xxi
Testing Your Pages with Browser Compatibility 487
Setting the target browsers for Browser Compatibility 488
Using the Browser Compatibility tab 489
Viewing and  xing errors 491
Checking and Fixing Links 492
Handling Work ow and HTML Reports 494
Launching reports 494
Saving reports as XML  les 497
Viewing File Transfer Activity with the FTP Log 498
Debugging a ColdFusion Application (Windows) 498
Chapter 2: Keeping Your Code Clean . . . . . . . . . . . . . . . . . . . . . . . . . . .501
Eliminating Formatting Issues Before They Occur 502
Setting Copy and Paste preferences 502
Using the Paste Special command 504
Cleaning up Word HTML 504
Checking Your Spelling, Grammar, and Readability 506
Getting Your HTML and XHTML Code Consistent 508
Reviewing Source Formatting and Making Changes 510
Setting code formatting preferences 510
Introducing your Code Category preferences 510
Applying Source Formatting 514
Applying source formatting to a complete  le 514

Applying source formatting to a selection 515
Using the JavaScript Extractor (JSE) 515
Changing Links Sitewide 517
Chapter 3: Preparing to Publish Your Files Online. . . . . . . . . . . . . . . .519
Creating a Remote Connection 519
Setting up a remote folder 520
Con guring a connection type 522
Cloaking Your Files and Folders 531
Enabling and disabling cloaking options 532
Cloaking individual folders 533
Uncloaking previously cloaked  le types 534
Chapter 4: Publishing Your Web Pages Online . . . . . . . . . . . . . . . . . .535
Understanding File Transfer Basics 535
Transferring dependent  les 536
Working during  le transfers 536
Putting Files on and Getting Files from the Remote Server 537
Examining the Files panel transfer options 538
Putting  les on a remote server 540
Getting  les from a remote server 542
Viewing the FTP and background  le activity logs 542
Keeping Your Local and Remote Site Files Up-to-Date 544
Viewing the newest  les without synchronization 544
Synchronizing your  les 545
02_610770-ftoc.indd xxi02_610770-ftoc.indd xxi 5/6/10 1:03 PM5/6/10 1:03 PM
Dreamweaver CS5 All-in-One For Dummies
xxii
Book VI: Working Collaboratively 549
Chapter 1: Working Effi ciently with a Team . . . . . . . . . . . . . . . . . . . . .551
Attaching Design Notes to Your Files 551
Enabling and disabling Design Notes 553

Removing Design Notes 554
Adding Design Notes to a  le 554
Viewing and editing Design Notes 556
Checking Files In and Out 557
Using Version Control with Subversion 559
De ning File View Columns 561
Customizing File View Columns 561
Sorting File View Columns 563
Chapter 2: Setting Up and Connecting to a Contribute Site . . . . . . . .565
Understanding Contribute Best Practices 566
Making a Dreamweaver Site Connection Compatible with Contribute 567
Using Dreamweaver to Administer a Contribute Site 569
Making the Most of Templates 572
Leaving a Trail of Bread Crumbs for Contribute Users 574
Connecting to a Contribute Site 574
Transferring  les to and from a Contribute
site from within Dreamweaver 575
Setting Contribute  le and folder permissions 576
Understanding Contribute Special Files 576
Troubleshooting a Contribute Site in Dreamweaver 577
Fixing connection problems 577
Checking the _mm folder 578
Chapter 3: Managing a Contribute Site . . . . . . . . . . . . . . . . . . . . . . . . .581
Managing Contribute Files Using Dreamweaver 582
Rolling back your  les 583
Making changes to Contribute  les 585
Enabling Contribute users to use templates 586
Unlocking a checked out  le 587
Using Dreamweaver to Edit a Contribute Site 588
Updating templates in a Contribute site 588

Editing style sheets in a Contribute site 588
Chapter 4: Collaborating Online with InContext Editing. . . . . . . . . . .591
Creating and Managing Editable Regions 592
Creating editable regions 592
Creating repeating regions 595
Deleting editable regions 596
Preparing a Site for Use with InContext Editing 597
Inviting Users to the Site 598
Updating Pages with InContext Editing 598
02_610770-ftoc.indd xxii02_610770-ftoc.indd xxii 5/6/10 1:03 PM5/6/10 1:03 PM
Table of Contents
xxiii
Book VII: Building Web Applications 601
Chapter 1: Preparing to Build Web Applications. . . . . . . . . . . . . . . . .603
Understanding Web Applications 603
Choosing a Web Application Platform 605
Choosing a Web Server 605
Hosted sites 605
Hosting your own site 606
Choosing an Application Server 608
PHP 608
Active Server Pages (ASP) 610
ASP.NET 610
Java Server Pages (JSP) 610
ColdFusion 611
Considering Web/Application Server Combinations 611
Setting Up the Testing Server in Dreamweaver 612
Introducing Databases 614
Choosing a Database 615
Chapter 2: Confi guring MySQL Database Connections for PHP . . . .617

Adding a PHP Database Connection 617
Creating a new dynamic PHP page 617
Creating the database connection for PHP 619
Editing a PHP Database Connection 622
Deleting a PHP Database Connection 622
Chapter 3: Confi guring ASP Database Connections . . . . . . . . . . . . . .625
Understanding ASP Database Connections 625
Creating a New ASP Page 626
Connecting to a Database with a Data Source Name (DSN) 627
Connecting to a Database with a Custom Connection String 629
Connecting to a Remote Database without a DSN 631
Understanding physical paths and virtual paths 631
Finding the database’s physical path when you know
the virtual path 631
Connecting to a remote database with a virtual path 632
Editing an ASP Database Connection 633
Deleting an ASP Database Connection 633
Chapter 4: Confi guring ASP.NET Database Connections . . . . . . . . . .635
Exploring ASP.NET Database Connections 635
Creating a New ASP.NET Page 636
Building an OLE DB Connection 637
Using templates 637
Using data link properties 639
Building an SQL Server Connection 639
Editing an ASP.NET Database Connection 640
Deleting an ASP.NET Database Connection 641
02_610770-ftoc.indd xxiii02_610770-ftoc.indd xxiii 5/6/10 1:03 PM5/6/10 1:03 PM

×