Archived copy for reference only
 

 

Graphic Design / Interactive Design / Fine & Applied Arts / Parkland College

Interactive Design Exercises
Dreamweaver: Templates (Mourning Dove)

(Archived from 2019)

Objective

To practice CSS site building skills in Dreamweaver by converting this
text-only HTML web site into this CSS web site.

Discussion

Dreamweaver templates have very powerful automation tools for managing hundreds of pages. In this exercise, we will build a responsive master page from scratch and then convert it into a Dreamweaver template.

To make our website responsive, we'll use Matt Imlin's "One Percent CSS Grid." This framework is one of the easier to understand systems out there.

Important: When using Dreamweaver's templates, you MUST have a separate site definition for every site. There must be a separate TEMPLATE folder in the root directory of every site where templates are being used.

Procedure

Overview: Prep pixel elements in Photoshop (optional), add pixel elements to existing text-only HTML files, add CSS styles. Make a template page. Apply template to content. Test, publish to server. Note: replace bold with personalized info.

Prepping for the exercise

  1. download starter files (move files to proper location)
  2. download responsive framework files;
    merge with "dove" folder
  3. examine files
  4. open "dove.psd" in Photoshop (optional)
  5. save as "dove-front.psd" and "dove-inside.psd"
  6. slice elements needed for both pages
  7. create a seamless tile (see tutorial)

Laying out the master page

  1. launch dreamweaver
  2. define a new site (site > new site): name=dove,
    local root folder=class/html/exercises/dove_html
  3. copy contents of "framework" folder into root folder
  4. open "grid.html"; save as "master.html"
  5. select 4th row <div.onerow>; copy
  6. delete <div.onepcssgrid-1000>
  7. paste (note <div.col4> is now <div.col41>; edit as follows)
  8. change the following DIVs:
    • <div.col41> to <div.col2>
    • <div.col41> to <div.col3>
    • <div.col4 last> to <div.col7 last>
  9. wrap DIVs around the following content:
    • inside <div.col2>: <div#menu>
    • inside <div.col3>: <div#pix>
    • inside <div.col7 last>: <div#content>
  10. copy content from "calendar.html" into above DIVs
  11. make menu items <ul>
  12. insert > image "logo.png" into <div#menu>; link to "index.html"
  13. select <body>; arrow left
  14. insert > image "bg-calendar.gif"; class=right
  15. select <img.right>
  16. insert > layout objects > div tag: ID=bg (wraparound)
  17. select <div#bg>
  18. insert > layout objects > div tag: ID=top (wraparound)

Styling the master page

  1. insert > image "tracing_images/colors.gif" (for reference)
  2. window > css: edit "font.css"
    • body: Georgia, 1/1.4em
    • h1: 1.8/1em, italic, green
    • h2: Arial Black, 1em, blue; box: padding-top/bottom=0
    • a: brown
    • a:hover: blue, text-decoration=none
  3. delete "colors.gif"
  4. window > css: new css style (+), define in "font.css":
    • #menu ul li: list-style-type=none
    • #menu ul: box: padding-left=0
    • #menu a: Arial Black, .75em
  5. window > css: edit "layout.css"
    • body: bg="tile.gif", repeat-y
    • .container: min-width=1000px (disable all other properties)
  6. window > css: new css style (+), define in "layout.css":
    • #menu: box: width=178px; block: text-align=center
    • #menu img: margin-bottom=25px
    • #pix: position: relative, height=500px
    • #content: box: margin-top=150px, width=70%, max-width=600px
    • #top: position: absolute, z-index=-1, width=100%; min-width=1000px
    • #bg: bg="line-tile.gif", repeat-x; box: height=378px, margin-left=250px
  7. file > preview in browser (opt+F12)

Laying out photos

  1. insert > image "calendar1.jpg" into <div#pix>; ID=pix1
  2. window > css: new css style (+), define in this document only:
    • #pix1: position=absolute, z-index=1, left=??, top=??
  3. repeat with other calendar images, adjust position & z-index
  4. file > preview in browser (opt+F12)

Finishing the HTML file

  1. change title to "Mourning Dove Farms"
  2. add alt tags
  3. commands > clean up HTML
  4. file > check page...

Defining CSS "hit" states

  1. window > css: new css style (+), define in this document only
    • .calendar: color=blue
  2. apply .calendar to <a> for "Calendar of Events"
  3. add other unique classes to each menu item (code view)

Making a style sheet for small screens

  1. view > window size > tablet
  2. window > css: new css style (+), define in "layout_small.css"
    • #pix, #top: block: display=none
    • #menu: bg: bg-img="tile.gif"; width=100%, margin-top=-40px
    • #menu img: display=inline; box: margin-bottom=15px
    • #menu ul li: box: padding-right=20px; display=inline
    • #menu ul: box: padding-left=20px
    • #content: box: width=90%, margin-left/right=auto, margin-top=30px
  3. edit <body>: bg: image=spacer.gif
  4. view > window size > full width
  5. file > preview in browser (opt+F12)

Making a print style

  1. view > style rendering > print
  2. window > css: new css style (+), define in "print.css"
    • #top: block: display=none
  3. delete all other styles in "print.css"
  4. view > style rendering > screen
  5. file > preview in browser (opt+F12); file > print preview

Making a Dreamweaver template

  1. file > save as template: "master.dwt"
  2. insert > template objects > editable regions:
    • content (don't include <div> tag)
    • bg (just <img.right>)
  3. move #pix styles into editable region in <head>

Applying template to pages

  1. open "plants.html"
  2. modify > template > apply template to page
  3. swap out images, adjust position, z-index
  4. rename .calendar to .plants (in <style>)
  5. repeat with other pages (contact has same images as calendar)
  6. site > check links sitewide

Fine-tuning the Map page

  1. select all map text (cmd+A)
  2. insert > layout objects > div tag (ID=map)
  3. window > css: new css style (+), define in this document only
    • #map: box: width=350px, margin-left=-180px; position=absolute
  4. window > css: new css style (+), define in "layout_small.css"
    • #map: box: width=100%, margin-left=0px
  5. file > preview in browser (opt+F12); file > print preview

Making the home page

  1. open "index.html"
  2. modify > template > apply template to page
  3. modify > templates > detach from template
  4. delete <div.col3>
  5. rename <div.col7 last> as <div.col10 last> (code view)
  6. replace "bg-calendar.gif" with "home-top.jpg" (double-click)
  7. rename <div#bg> as <div#bg-home>
  8. rename <div#content> as <div#content-home>
  9. window > css: new css style (+), define in "layout.css"
    • #bg-home: box: height=???, margin-left=178px;
    bg-image="home=top.jpg"
    • #content-home: box: width=50%, margin-left/right=auto, margin-top=200px
    • rename .calendar as .none
  10. delete "home-top.jpg"
  11. view > window size > tablet
  12. rename <div#top> as <div#top-home>
  13. window > css: new css style (+), define in "layout_small.css"
    • #top-home: position: relative, z-index=1; box: margin-bottom=-20px;
    min-width=0
    • #bg-home: bg-image="../images/home-top.jpg"; box: margin-left=-2px
    • #content-home: box: width=90%, margin-top=0
  14. view > window size > full width
  15. file > preview in browser (opt+F12); file > print preview

Grading

  1. publish site (see separate lesson)
  2. test site responsiveness at mattkersley.com/responsive
  3. make a link from your process page to this assignment

BACK TO TOP
Last updated: 5/10/21