Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Dreamweaver Developer Center /

Building scalable websites with Dreamweaver

by Chris Converse

Chris Converse
  • Codify Design Studio

Created

8 December 2008

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
CSS Dreamweaver CS4 Dreamweaver CS5 JavaScript scalability templates website

Requirements

Prerequisite knowledge

Familiarity with the Dreamweaver workspace.

User level

Beginning

Required products

  • Dreamweaver (Download trial)

Note: This tutorial was written for Creative Suite 4. Although the screenshots may differ from what you see on your screen, the content is still valid for Creative Suite 5 and later.

Strategies for efficient, and scalable, web development have really changed in the past few years. While some fundamental concepts still exist at the core, other advancements in standards adoption and new Dreamweaver development features, have given way to even faster and more expansive techniques.

At the core

With the Web becoming an immensely crowded place, clean document structure is becoming more and more important. When search engines catalog your site, you want them to see a well thought-out structure, clean tags, and understandably labeled links to the other pages in your site. Combining HTML and cascading style sheets (CSS) allows you to create a visually appealing site, while maintaining a good structure for your visitors. What's more, you can construct your CSS rules in a separate file altogether, allowing any number of HTML pages to simply refer to a single CSS file. This way, when you make changes to your single CSS file, your entire website, regardless of how many pages, will reflect these changes.

After the basics are in place, you can use HTML and CSS in conjunction with JavaScript to create rich interactive experiences without the user even needing to visit multiple pages of your site. New features in Dreamweaver CS3 and CS4 allow you to create these experiences with great ease and speed.

Site management tools in Dreamweaver let you keep track of your pages and links, manage layout and content through templates and Library items, code snippets, and allow you to synchronize and upload files to your web server when you're finished working on the site.

Lastly, you can use server-side technologies to allow your web server to do some of the work for you, such as including code dynamically, creating breadcrumbs, or leveraging an unlimited number of other possibilities available to you on the web.

Use CSS

First, you need to create a CSS file and link it to our HTML file. Create a CSS file by choosing File > New > Blank Page > CSS in the New Document dialog box. Save and name the CSS file. Open your HTML file in Dreamweaver, then choose Format > CSS Styles > Attach Style Sheet. You can also right-click inside of the page area of the HTML document and choose CSS Styles > Attach Stylesheet from the contextual menu (see Figure 1).

file
Figure 1. Linking a CSS file to your HTML page.

What Dreamweaver does is add a link tag in the heading area of the HTML document with a reference attribute to the CSS file you just created (see Figure 2). Every HTML page in your website that contains this link tag in the head area will have access to the CSS rules you create in that CSS document.

file
Figure 2. Add a link tag in the head area of your HTML page.

On the web, CSS is responsible for both layout as well as text styling. By wrapping HTML tags in DIV and SPAN tags, you can control groups of HTML tags, and give them properties, such as width, alignment settings, and background colors, to name a few (see Figure 3).

file
Figure 3. CSS controls both layout and text styling.

With CSS controlling your site's layout, making modifications to your layout as your site grows is as quick as making style changes, and it can be done from a single CSS file.

Note: To learn to work with CSS in Dreamweaver, check out the tutorials in the Dreamweaver Developer Center and Creating pages with CSS (CS4) / Creating pages with CSS (CS5) in Dreamweaver Help.

Add in some JavaScript and Spry widgets

In addition to being able to update your CSS using the Dreamweaver CSS panel, CSS rules can also be manipulated through JavaScript. JavaScript is a client-side scripting language, which means that the software needed to understand JavaScript instructions is already on your user's computer, inside of applications like web browsers, Adobe Reader, and Adobe AIR.

First introduced to Dreamweaver in version CS3, the Spry widgets objects give you instant access to the power of Ajax from within Dreamweaver. Simply select a widget from the insert panel, and Dreamweaver will do the rest.

The following example outlines how to create a tabbed panel. With your HTML page open in Dreamweaver, click the Tabbed panel widget in the Insert panel's Spry tab. Dreamweaver will create all of the necessary HTML, CSS, and JavaScript code to make your Tabbed panel functional (see Figure 4).

file
Figure 4. Adding a Tabbed panel to your HTML page.

When you have finished adding your panels and content, preview your web page in a browser and click the tabs to see your content update within the same web page, without even reloading.

If you take a look at the source code you'll see the tabbed panel widget is simply made up of a standard bullet list, ul and li tags, and a corresponding set of div tags. When this page loads, the JavaScript file named SpryTabbedPanels.js, which is added automatically by Dreamweaver, initializes in the web browser and rearranges a series of CSS rules, also added by Dreamweaver in the file SpryTabbedPanels.css, and manipulates the visibility and position of the HTML tags based on the user's mouse-clicks. You can add or remove panels as needed either in Code view, or in the Properties panel. This functionality allows you to add or remove content within your site without creating additional pages for related material.

Dreamweaver CS4 features two more widgets, in addition to a new Dataset wizard that is nothing short of amazing. You can quickly create truly dynamic web pages from external data sources such as HTML, XML, and JSON; all with the ease and simplicity of a stepped wizard.

Note: To learn more about the Spry framework for Ajax and what you can do with widgets check out the Spry Technology Center and Adobe Labs.

Let Dreamweaver manage your site

In order to take advantage of Dreamweaver's site management capabilities, you'll need to set up a site. A site is nothing more than a folder on your hard drive, or network drive, where Dreamweaver expects to find the files that belong to your website. As you add files such as HTML, CSS, SWF (Flash), GIF and JPG graphics, Dreamweaver will be able to make sure that all files, links, CSS, Flash, and images are linked properly throughout your site. In addition, Dreamweaver can also store information about your website, such as log-in and file transfer information. This allows Dreamweaver to connect to your web server and upload files you create or update when you are ready.

To create a site, simply go to the Site menu in Dreamweaver and choose New Site. The New Site wizard will walk you through the process of naming your site, picking a local directory (where all of your web files are, or will be), and entering your web server info (you'd get that info from your hosting company, or server administrator).

Note: For more details, see Working with sites (CS4) / Working with sites (CS5) in Dreamweaver Help.

Use Dreamweaver templates

With a site defined, you can now use some of Dreamweaver's site management capabilities. One feature that can save you lots of time in growing your site is templates. When you have a web page ready that can serve as a base structure for other pages, you are ready to convert that into template. A Dreamweaver template is a regular web page with areas designated as editable regions (see Figure 5). These regions act as "holes" when you apply a template to a new HTML page in your site. Areas inside of the regions can be customized on each page they are applied to. Typically you create editable regions for content areas, promotional areas; even inside of Spry widgets; anywhere you'd want a web page to be customized.

file
Figure 5. Using editable regions in Dreamweaver

The power of templates comes in when you edit the template itself. If you make an adjustment in the template, Dreamweaver will update every page in your site to match the template, but will not alter the content you have customized on each page inside of the editable regions. Adding and maintaining pages in your website have never been easier.

Note: For more information on this topic, see Creating and managing templates (CS4) / Creating and managing templates (CS5) in Dreamweaver Help.

Use Library items

Another feature of Dreamweaver site management comes in the form of Library items. These work much like the way symbols work in Flash or Illustrator. A Library item can be made up of any HTML and other web assets, and can be applied to any number of pages in your website. Let's say you have your company's phone number and address on a few key pages within your site, but you want to be able to update that information once, and have it be updated on all pages, just like templates. That's exactly what Library items are for.

Thinking one step beyond, since your web site can have multiple templates, Library items are a great way to share information between templates, especially if information between your templates is repeated, such as banner or footer information (see Figure 6).

Note: For more information on this topic, refer to the section Working with Library items (CS4) / Working with Library items (CS5) in Dreamweaver Help.

file
Figure 6. Library items are a great way to share information between templates

Leverage server-side technologies

The site management features mentioned above allow you to author templates and Library items from a single location, and Dreamweaver will take care of updating all of the HTML page sin your site. Another option for this same idea is to have your web server assemble parts of your web page automatically when someone visits your site.

There are many server-side technologies your web hosting company may offer. ColdFusion (by Adobe Systems), PHP, JSP, and ASP (by Microsoft) are some of the more common. In this example, I'll look at PHP, although the principle is the same for the others.

Unlike JavaScript, which is installed on your users' computers, server-side technologies are on your web server. The advantage of this is that your users only ever receive HTML from your server, and the server takes care of any processing. This reduces the amount of software you need to rely on for your users.

When you put server-side code into your web page, Dreamwaver will represent the code by putting a small object icon in the page where the code exists in relation to the layout (see Figure 7). If you select the object, you can edit the code directly in the Properties panel. When your users visit this web page in the following example, the server will include the HTML file as instructed by the PHP code, and users will see your web page plus the HTML code specified in the file to be included.

Note: For more information on this topic, see Preparing to build dynamic sites (CS4) / Preparing to build dynamic sites (CS5) in Dreamweaver Help.

file
Figure 7. Dreamwaver represents server-side code by putting a small object icon in the page where the code exists in relation to the layout

Where to go from here

To learn how to apply the techniques discussed in this article, be sure to check out the resources in the Dreamweaver Developer Center, including the following resources:

  • Learn to work with CSS
  • Learn to use the Spry framework for Ajax
  • Learn to build dynamic websites and web applications
  • Dreamweaver CS4 / Dreamweaver CS5 Help

More Like This

  • Integrating Flash content with the HTML environment
  • Understanding cascading style sheets
  • Customizable starter designs for beginners
  • Marking up your site for easier redesign in five steps
  • Getting Started with CSS excerpts: Styling tables, backgrounds, and borders
  • CSS page layout basics
  • Applying design to Spry widgets
  • Managing websites with multiple layouts
  • Building a photo album with the Spry framework
  • Checking for cross-browser CSS rendering issues

Tutorials and samples

Tutorials

  • Understanding HTML5 semantics: Changed and absent elements
  • Mobile app with PhoneGap: Submitting to the Apple App Store
  • PhoneGap and Dreamweaver: Releasing on iOS
  • Mobile app with PhoneGap: Creating a release build for Android

Samples

  • Responsive design with jQuery marquee
  • Customizable starter design for jQuery Mobile
  • Customizable starter design for HTML5 video
  • Customizable starter design for multiscreen development

Dreamweaver user forum

More
04/23/2012 Resolution/Compatibility/liquid layout
04/20/2012 using local/testing server with cs5 inserting images look fine in the split screen but do not show
04/18/2012 Ap Div help
04/23/2012 Updating

Dreamweaver Cookbook

More
11/07/2011 Simple social networking share buttons
09/20/2011 Registration form that will generate email for registrant to validate
08/21/2011 Spry Accordion - Vertical Text - Auto Start on Page Load - Mouse Over Pause
08/17/2011 Using cfdump anywhere you like

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement