Using Adobe Dreamweaver CS6 to Build a Simple Photo Gallery Website in 10 Easy Steps


SUBMITTED BY: Guest

DATE: Dec. 19, 2013, 7:30 p.m.

FORMAT: Text only

SIZE: 19.1 kB

HITS: 1088

  1. Step 1: Plan the website
  2. 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.
  3. 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.
  4. Step 2: Create a new site in Dreamweaver
  5. 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.
  6. Before you get started:
  7. 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.
  8. 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.
  9. 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.
  10. Create a new file and start the project:
  11. 1. Open Dreamweaver and choose Site > New Site.
  12. 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.
  13. 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.
  14. 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.
  15. 5. Close the blank HTML file when you are done.
  16. Step 3: Lay out the website template using Fluid Grid Layout
  17. 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:
  18. 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.
  19. 2. Change the column width from 25% to 15% and change the margin setting to 90% for all three sizes.
  20. 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.
  21. 4. Notice that Design view updates, and you now see the grid layout in the mobile screen size.
  22. 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.
  23. 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.
  24. Step 4: Add div tags and placeholder content
  25. 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 <body> tag, followed by nested <div> tags and a closing </body> 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.
  26. In this step, you'll create three div tags as rows in the grid and add placeholder content:
  27. 1. Select the text in the existing div tag and delete it. This div tag will hold the large image.
  28. 2. Place the cursor in the div tag and type Add image here as a placeholder for the template.
  29. 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.
  30. 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.
  31. 5. Delete the text in the new div tag and type Add text here as a placeholder.
  32. 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.
  33. 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 <img> tag in Code view while updating the file reference.
  34. 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.
  35. Step 5: Add styles to format the layout
  36. 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.
  37. In this step, you'll format the background color, font styles, div tag layout styles, and thumbnail image styles to format the template:
  38. 1. Choose Modify > Page Properties to open the Page Properties dialog box. You can use Page Properties to define global settings for the page.
  39. 2. Update the following properties under the Appearance (CSS) category and click OK:
  40. Page font: Trebuchet MS, Arial, Helvetica, or another sans-serif font
  41. Size: 16
  42. Text color: #FFF
  43. Background color: #333
  44. 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 <style> tree control, which shows the background-color style you just added in the Page Properties settings.
  45. 4. To add a property, click the Add Property button, choose the property from the menu, and enter a value in the resulting field. Add the following properties:
  46. text-align: center
  47. padding-top: 20px
  48. 5. The fluid grid layout page always appears with a parent div tag that contains all your other div tags. Add styles to the parent div by selecting it in the code or by clicking the outermost CSS layout guide box in Design view. Click the Current button in the CSS Styles panel and add the following styles:
  49. border: solid 8px #000
  50. background-color: #000
  51. Tip: The fluid grid layout is composed of three sets of CSS, one for each device size. You always want to start your layout in the mobile size because the styles you define there will be inherited by the other two layouts.
  52. 6. Click anywhere in the second div tag to select it. Notice that the div tag's styles appear in the CSS Styles panel. Add the following styles:
  53. padding-top: 12
  54. padding-bottom: 12
  55. 7. Add some spacing to the images by adjusting their margin style. Click one of the thumbnail images to select it and click the New CSS Rule button on the bottom of the CSS Styles panel. Click OK in the New CSS Rule dialog box. Add the following styles in the Box category in the CSS Rule Definition dialog box and then click OK to apply the style:
  56. margin: 5 px (same for all)
  57. 8. Notice that the new CSS rule appears selected in the CSS Styles panel. Click the Add Property button and add the following properties:
  58. border: solid 1px #000
  59. opacity: .75
  60. Save the file.
  61. At this point, the layout.html page is ready to be converted to a Dreamweaver template.
  62. Step 6: Create a Dreamweaver template with editable regions
  63. This website is purposefully designed to be very simple with the gallery pages sharing the same layout. Rather than redoing all the work for each page or copying and pasting the code, you can create a Dreamweaver template (DWT) file. A Dreamweaver template contains editable and non-editable regions that can be used to define consistent approaches to layout and branding. The template remains linked to each page you apply it to, which makes it easy to add global changes from a single location.
  64. In this step, you'll create a DWT template from the layout.html file with editable and non-editable regions:
  65. 1. With the layout.html file still in the view, choose File > Save As Template. The Save As Template dialog box appears.
  66. 2. Add a brief description and change the Save As filename to GalleryTemplate.
  67. 3. Click the Save button to create the template. In the Files panel, you can see that a new folder named Templates appears in the site, and the file has been saved as GalleryTemplate.dwt.
  68. 4. Select the Add image here text and choose Insert > Template Objects > Editable Region. The New Editable Region dialog box appears. Enter the name Image Area and click OK.
  69. 5. Select Add text here and repeat step 4. Name the editable region Text Area.
  70. 6. Save the file.
  71. At this point, you're ready to create the gallery pages using the DWT template.
  72. Step 7: Create the website pages by adding images and text
  73. Creating the gallery pages is easy. All you have to do is create a new page using the template and drop the supplied images and text into the placeholder areas.
  74. In this step, you'll create the detail pages using the template and supplied assets:
  75. 1. Choose File > New > Page From Template > GalleryTemplate and click Create. Explore the new page and notice that only the three editable regions can be changed.
  76. 2. Create a home page by saving the file with the name index.html. Web servers will automatically show the index.html page when you browse to the URL of the website.
  77. 3. Delete the template text in the Image Area and place the cursor in the Image Area editable region.
  78. 4. Choose Insert > Image and browse for the HomePageImage.psd file in the _Source folder. Because the image is a Photoshop file, Dreamweaver asks for publish settings in the Image Optimization dialog box. Click OK to accept the default publish settings in JPEG format and save the resulting image in the Images folder. If you happen to update the PSD file in Photoshop, Dreamweaver will automatically update the JPEG file. Enter the alt text Home Page when prompted.
  79. Tip: Dreamweaver CS6 includes a simple set of image editing controls available in the Properties panel when an image is selected. You can perform tasks such as cropping, resampling, or changing the brightness and contrast directly in Dreamweaver without needing additional image editing software on your computer.
  80. 5. Delete the text in the Text Area editable region and type Click a thumbnail to view the image.
  81. 6. Save the file.
  82. 7. Create another new page from the template and save the file with the name page1.html.
  83. 8. Delete the template text in the Image Area and replace it with image1.jpg from the Images/Full folder. Enter the alt text Image 1 when prompted.
  84. 9. Delete the text in the Text Area and add the text Photograph 1 in its place.
  85. 10. Save the file.
  86. 11. Repeat steps 7 through 10 for each of the remaining images to change the filename and text to match the image number in the sequence.
  87. At this point, your pages are filled with content, and they are ready to be linked together.
  88. Step 8: Create a navigation bar
  89. Navigation bars are a common feature in website design and can appear in many forms. Essentially they create hyperlinks between pages in the website (or elsewhere), and they provide a visual cue as a call to action.
  90. In this step, you'll convert the thumbnail images to a navigation bar:
  91. 1. Return to the GalleryTemplate.dwt page (which you can open from the Templates folder in the Files panel if you need to). You'll add the navigation links to the template so each of the pages implementing the template inherit the update.
  92. 2. Click the first thumbnail on the left (image1.jpg) to select it. Click the Point To File icon next to the Link field in the Properties panel and drag the cursor to the file you want to link to in the Files panel (see Figure 10). You can manually enter any URL in the Link field, but using the Point To File feature ensures that the link from the template in the Templates folder to the target HTML page is correct.
  93. 3. Repeat step 2 for each thumbnail image and HTML file.
  94. 4. Save the file and choose update links when prompted.
  95. Step 9: Add CSS3 page transitions
  96. CSS3 transitions provide a new level of animation support directly to the HTML environment, enabling Flash like effects using web standard technologies.
  97. In this step, you'll add CSS3 rollover transitions to the thumbnail images to create a visually engaging experience:
  98. 1. Return to the GalleryTemplate.dwt page if you're not already there.
  99. 2. Select a thumbnail image and choose Window > CSS Transitions to open the CSS Transitions panel.
  100. 3. Click the Create New Transition button (+) to launch the New Transition dialog box (see Figure 11).
  101. 4. Change the following parameters:
  102. Target Rule: .gridContainer.clearfix #LayoutDiv3 img
  103. Transition On: Hover
  104. Duration: .5s
  105. Delay: 0s
  106. Timing Function: Ease-Out
  107. 5. The rollover effect will add a white highlight to the border of the thumbnail image, and the image will become completely visible. Click the Plus button under the Property area and set the following styles and values:
  108. border-color: #FFF (white)
  109. opacity: 1
  110. 6. Click Create Transition to add the transition styles to the site.
  111. 7. Save the file.
  112. Tip: CSS transitions are supported in the following browsers: Chrome 1.0, Safari 3.2, Firefox 4.0, Internet Explorer 10, and Opera 10.5.
  113. At this point, you've created the home page and detail pages, and you've added the finishing touches to the navigation bar with a CSS3 transition.
  114. Step 10: Preview and deploy your work
  115. It's a good idea to preview your work often as you build the website. Dreamweaver CS6 provides several ways to preview, including using Design view, using Live View, using Multiscreen Preview, and previewing in a browser.
  116. You'll find that using Design view and Live View are the easiest ways to check your work before publishing. Previewing in a browser is a common task that shows your work in your default browser. Multiscreen Preview is useful when checking your work for mobile and tablet sizes. In this step, you'll explore your options for previewing your work.
  117. Check your work using Live View:
  118. 1. Click the Live button at the top left of the workspace. Once you enter this mode, you can preview CSS3 and HTML5 features in the workspace.
  119. 2. Click the Live button again to return to Design view.
  120. 3. Save the file.
  121. Check your work by previewing in a browser:
  122. 1. Choose File > Preview In Browser to launch the current page in the target browser. You can also launch the page using the Preview/Debug In Browser button above Design view.
  123. 2. Change the size of the browser window to see the fluid layout resize itself.
  124. Tip: It's a good idea to use this option as opposed to simply opening the page in a browser because it saves all the dependent files where the CSS is stored.
  125. Check your work using Multiscreen Preview by choosing Window > Multiscreen Preview.
  126. Now that the website is complete, you'll need to upload it to a server so that people surfing the Internet can see it. You can use any FTP tool to accomplish this, but the Dreamweaver Files panel has FTP capabilities built into it. Dreamweaver CS6 includes performance improvements so you can upload large files and large websites faster and more efficiently than before.
  127. Explore using the Dreamweaver FTP tool:
  128. 1. In the Files panel, click the Expand To Show Local And Remote Sites button in the upper right. This button expands the panel to show the file system locally and on your remote server.
  129. 2. From the main menu, choose Site > New Site to bring up the Site Setup dialog box.
  130. 3. Click the Plus button to add a new server.
  131. 4. Enter your server's name, FTP address, username, and password, and click Save.
  132. 5. Click Save in the Site Setup dialog box to save the change.
  133. 6. From here, you can click the Connect To Remote Server button to log into your FTP server. Then select files to upload and click the Put Files button (up arrow). You can add, remove, and synchronize files as needed.
  134. 7. Click the Expand To Show button (now called Collapse) and click Show Only Local or Remote Site. Return to editing view.

comments powered by Disqus