Step 1: Plan the website The first thing to do is define the pages that will be included in the website and the visual theme the pages will use for branding and layout. This can be quite an extensive task for complex websites, but for the purposes of this tutorial, the photo gallery will follow a very simple design. Essentially the gallery is composed of a single layout used to build a home page and detail pages. Since the pages will all follow the same design, it's a good idea to use a Dreamweaver template. Step 2: Create a new site in Dreamweaver Dreamweaver organizes projects by website and provides the Files and Assets panels so you can easily organize and deploy content. In this step, you'll set up the website folder and then create a new site in Dreamweaver. Before you get started: 1. Download the project files (ZIP, 9 MB) from http://download.macromedia.com/pub/inspire/1012/dwcs6_project.zip and unzip the archive. Save your published files in this folder and use the project assets to follow the steps in the tutorial. 2. Download the completed project files (ZIP, 9 MB) from http://download.macromedia.com/pub/inspire/1012/dwcs6_project_completed.zip to use as a reference. You can deconstruct these files if you run into any problems. 3. Download the free trial of Dreamweaver CS6 from http://www.adobe.com/go/trydreamweaver/ and install the application if you haven't already done so. You can also use your Creative Cloud membership (sign-up at http://www.adobe.com/go/creativecloud/) to download and install the product. Create a new file and start the project: 1. Open Dreamweaver and choose Site > New Site. 2. In the Site Setup dialog box, enter Photo Gallery in the Site Name field and click the folder next to the Local Site Folder field to browse for the dwcs6_project folder, which is included in the project files you just downloaded. 3. Click Save to create the site. Notice that the Files and Assets panels now reflect the content inside the website project folder. Note that you'll use supplied content from the _Source and Images folders. 4. Before you get started, take a moment to explore the Dreamweaver workspace.. The main area of the screen changes depending on whether you're looking at the Code view, Design view, Split view, or Live View mode. This area is where you'll see your work. The Properties panel on the bottom of the screen is context sensitive and displays properties for any selected object. The Files and Assets panels enable you to manage files in the website. The CSS Styles panel enables you to manage text and formatting styles throughout the website. The Mobile Size, Tablet Size, and Desktop Size buttons on the bottom of the screen in Design view enable you to check your work at standard sizes. 5. Close the blank HTML file when you are done. Step 3: Lay out the website template using Fluid Grid Layout The Fluid Grid Layout feature is new to Dreamweaver CS6. It provides an easy way to use CSS to create fluid page layouts that can size themselves to any screen or device. In this step, you'll create the foundation for the website template: 1. Choose File > New Fluid Grid Layout to launch the New Document dialog box. Notice that the Fluid Grid Layout options include settings for mobile, tablet, and desktop sizes. The concept is that you'll lay out content in a grid of div tags set to fluidly span the page. Each of the three sizes can define its own CSS layout for each div tag. In this step, you can change the number of columns, spacing, and margins for each layout. 2. Change the column width from 25% to 15% and change the margin setting to 90% for all three sizes. 3. When you click the Create button, Dreamweaver will generate a CSS file to save your grid CSS settings as you work. Click Create and save the CSS file with the name GalleryTemplate.css in the Assets folder. 4. Notice that Design view updates, and you now see the grid layout in the mobile screen size. 5. Save the file in the root of the project folder with the name layout.html. Dreamweaver will ask you where you'd like to copy the dependent CSS and JavaScript files that go along with the fluid grid page. You don't need to do anything with these files, but they need to be included with the site. Browse for the Assets folder and click Copy. At this point, the page appears as a series of column guides and one fluid grid layout div tag creating a row in the grid. Step 4: Add div tags and placeholder content HTML is simply a tree of nested tags that defines the relationship of content on a web page. In this example, the part of the HTML you see in a browser starts with the tag, followed by nested
tags and a closing tag. A div tag is an organizational element used to group content on the page in a logical way. CSS styles can be assigned to each div tag to format text and add layout styles such as position, background, and border. In this step, you'll create three div tags as rows in the grid and add placeholder content: 1. Select the text in the existing div tag and delete it. This div tag will hold the large image. 2. Place the cursor in the div tag and type Add image here as a placeholder for the template. 3. Click the Split button on the top left side of the workspace to display both Code view and Design view. It's often easier to edit and fix issues in Code view. 4. Add another div tag by selecting the LayoutDiv1 tag in the code or along the tag selector and choose Insert > Layout Object > Fluid Grid Layout Div Tag. Click OK to accept the default settings. Selecting the previous div tag before inserting the next div tag is an important step to make sure the tags are next to each other in the code hierarchy. 5. Delete the text in the new div tag and type Add text here as a placeholder. 6. Add another fluid grid layout div tag to add another row below the text row. This div tag will hold a series of thumbnail images. 7. Click inside the new div tag and choose Insert > Image. Browse for the image1.jpg file from the Images/Thumb folder and click OK. Enter the alt text Image 1 when prompted and click OK. Repeat this process for the remaining nine thumbnail images. You can also drag the images to the div tag from the Files or Assets panel, or you can add the images by copying and pasting the tag in Code view while updating the file reference. Right now, the template has all the elements needed to produce the website pages, but it could use some style formatting to refine the layout. Step 5: Add styles to format the layout CSS styles enable you to format the text and visual presentation of the div tag layout. Separating the formatting definition from the definition of the content in the div tags allows for a flexible design workflow. In this step, you'll format the background color, font styles, div tag layout styles, and thumbnail image styles to format the template: 1. Choose Modify > Page Properties to open the Page Properties dialog box. You can use Page Properties to define global settings for the page. 2. Update the following properties under the Appearance (CSS) category and click OK: Page font: Trebuchet MS, Arial, Helvetica, or another sans-serif font Size: 16 Text color: #FFF Background color: #333 3. Add more styles to the body tag to center-align all the content and add some top padding. To do this, click the All button at the top of the CSS Styles panel to show all the style rules in the site. Click the body rule below the