COIN 65 Logo
This page contains the materials needed for Internet Technologies - COIN 65 taught by Sandi Watkins.
View the forum for updates and announcements. View my blog for the same!
Sandi's Blog | Schedule | ETUDES | Forum | Class Sites | Syllabus | Resources | CTIS | Foothill
Homework 6 - Float/Position
(15 points)

[ See Schedule page for due date. ]

Guidelines

Specifics

This assignment asks you to create several documents which will give you practice with floats, positioning and a bit of layout.

Document #1 - Practice with Image and Float

Premise - In this practice, you will investigate how images position themselves normally and how you can change their positioning by using float.

  1. View the images and text necessary for this exercise, and copy them. Use the Lorem text for content.
  2. Create a new document in your editor, and name it float1_prac.html.
  3. Style the body element:
     
    You may use embedded or linked styles, whichever you find easier. But do not use any in-line styles.
     
    • Set appropriate margins for all four sides of the body. I used 2% for the top/bottom and 2% for the left/right, but you can adjust these to suit your taste.
    • Set a color for the text and an appropriate background color.
    • Set the default font size and font family for the body. Specify a font family(s) you desire but be sure to include a generic font family at the end of the list.
  4. Create a class to justify text.
  5. Create a class to float an element left and another class to float an element right. Add some padding. I used .5em.
  6. Create an ID to float left with padding of .25em and a similar ID that floats right with the same padding.
  7. Create a class to clear both.
  8. Set up 7 paragraphs of text using P tags. Make each paragraph different lengths - some long, some short. The last paragraph should be quite long.
     
    1. Paragraph 1: add an image (no styling) at the beginning of the P tag.
    2. Paragraph 2: add an image set to float left at the beginning of the P tag.
      Note the differences between a and b.
    3. Paragraph 3: add an image at the beginning of the the P tag set to float to right.
    4. Paragraph 4: bury an image (no styling) in the middle of the P tag.
    5. Paragraph 5: bury an image styled with the ID that floats left in the middle of the P tag.
      Note the differences between d and e.
    6. Paragraph 6: justify the text. Bury an image styled with the ID that floats right in the middle of the P tag.
    7. Paragraph 7: justify the text. Add an image set to float left at the beginning of the P tag. Add another image floated right buried inside the same P tag.
    8. Use clear where necessary to keep elements separate.

Here is an example of what you might create:

sample 1 illustration


Document #2 - Pre-layout with Float

Premise - In this page, you will experiment with floated elements as they might pertain to page layout.

  1. Create a new document in your editor and name it float2_prac.html.
  2. Style the body element:
     
    You may use embedded or linked styles, whichever you find easier. But do not use any in-line styles.
     
    • Set appropriate margins for all four sides of the body. I used 2% for the top/bottom and 2% for the left/right, but you can adjust these to suit your taste.
    • Set a color for the text and an appropriate background color.
    • Set the default font size and font family for the body. Specify a font family(s) you desire but be sure to include a generic font family at the end of the list.
  3. Create 4 paragraphs of text - some long and some shorter. Create one paragraph that contains 6-10 "links". The "links" should be the 4th paragraph. For now, use breaks to separate the links - later you will learn a better method.
  4. Set a class to justify text.
  5. Set a class to float an element left and another class to float an element right. Add some padding. I used .5em.
  6. Set a class to clear both.
  7. Float the image to the right in paragraph 1
  8. Float the image to the left in paragraphs 2,3 and 5.
  9. Float paragraph 2 to the right.
  10. Float the "links" to the left.
  11. Use what you have learned so far to set clears, justification, margins, widths, padding, borders, etc. for each element.
  12. Resize the window. What happens to your layout?

Here is an example of what you might create.
Note: the numbers on the image below are there so you know the paragraph order - they are not included as text! However, if you want a challenge, you could add them as text and then use absolute positioning to place them.

sample 2 illustration

Premise - For this page, you will create a photo gallery using the supplied images (or your own). You will NOT use tables! Follow the directions in the links below to create your gallery. Feel free to adapt the styles and to be creative for your own situation.

  1. Creating a Photo Gallery
  2. Styling the DIV
  3. Styling the Image and the Paragraph
  4. Force a Line Break
  5. Change Configuration

Here is an example of what you might create, but I hope yours is more exciting:

sample 3 illustration

Submitting Your Assignment

 

Top | Sandi's Blog | Schedule | ETUDES | Forum | Class Sites | Syllabus | Resources | CTIS | Foothill
This site is best viewed with a "modern" browser - Firefox, Netscape, Opera, Safari (not IE 6 or below)
For best results, install the following plug-ins: Adobe Acrobat Reader, Quicktime, and RealAudio.
Copyright © 2006-07 Sandi Watkins & Greg Mcilhiney
Internet Technologies Department / Computers, Technology & Information Systems Division
Last Update: Saturday, April 7, 2007 at 7:38 AM