Archived copy for reference only
 

 

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

Interactive Design Exercises
Dreamweaver: CSS Float

(Archived from 2019)

Objective

To learn CSS layout techniques by recreating this web page.

Discussion

Multiple columns of text are a challenge with XHTML and CSS. One possible approach is to make use of float techniques. When floating text columns, it is essential to specify a width for each floated column. One other trick for working with floats is to "clear" the float in order to wipe the slate clean for the next block of columns.

In addition, when preparing transparent GIF files that float on top a colored background, one must add a matte color in order to avoid a white "fringe" in a browser. Fortunately, Photoshop's optimization tool makes this an easy procedure.

Procedure

Prepping for the exercise

  1. download starter files (move files to proper location)
  2. download CSS reset starter files (move CSS files to proper location)
  3. launch Photoshop, file > new (210 x 50px, RGB, transparent)
  4. file > place "logo.ai", scale down slightly
  5. open "tile.jpg": eye-dropper a typical yellow, close
  6. file > save for web (GIF 32 no dither, matte=foreground color)

Laying out the résumé page

  1. launch dreamweaver
  2. open "resume.html"
  3. insert > image "logo.gif" at top of file
  4. window > CSS: link "reset.css", "boilerplate.css", "font.css"
  5. select <body>: insert > layout objects > div tag: id=wrapper
  6. window > CSS: add the following CSS styles to this document only
    • div: border: solid, thin, red (temporary style)
  7. window > CSS: add the following CSS styles to "layout.css"
    • body: background: image="tile.jpg"
    • #wrapper: box: width=800px, margin left/right=auto
    • ul li: list: image="bullet.gif";
    • .col1: box: float=left, width=280, padding-bottom=6em
    • .col2: box: float=left, width=500, padding-bottom=6em
    • .rule: border-top: solid, thin, black; box: height=2em
  8. select <img>
  9. insert > layout objects > div: class=col1
  10. select each <ul>
  11. insert > layout objects > div: class=col1
  12. select each <p>
  13. insert > layout objects > div: class=col2
  14. add <br.clear> to clear float (after each <div.col2>)
  15. insert > layout objects > div: class=.rule (as needed)
  16. replace placeholder text with &nbsp;
  17. save, file > preview in browser (opt+F12 and cmd+F12)

Fine-tuning the CSS

  1. select first <div.col2>: id=top
  2. window > CSS: add the following CSS styles to "layout.css"
    • #top: box: margin-top=12px
  3. window > CSS: edit the following CSS styles:
    • disable borders in temporary <div>
    • .col2: box: margin-left=20px
    • .rule: box: margin-left=40px
    • #wrapper: box: margin-top=30px, padding-right=40px
  4. save, file > preview in browser (opt+F12 and cmd+F12)

Grading

  1. publish file (see separate lesson)
  2. make a link from your process page to this assignment

BACK TO TOP
Last updated: 5/7/21