Experiment 9
print
(last updated:
Oct 16, 2009)
print
The goal of this experiment is to work with a relatively dull webpage about
composting fall leaves and spice it up by adding a background image along
with other style features.
The desired overall effect is illustrated here:
composting.html (final version)
-
Create a folder composting
and within it, the subfolder
images.
-
Download the starter file to the
composting folder
using the download link,
composting.html (initial version) (view as source and save if necessary).
-
Part of the style modifications require a background image,
bg.jpg
You can obtain a version of the desired image directly by downloading
and saving it into the
images subfolder
of composting.
Alternatively, use Photoshop to create such an image from the large
digital photograph fall-tree.jpg
which can be downloaded here:
Save it to the wherever you want to work with it.
We will work this into the desired form, subject to these points:
- it is relatively large and so unlikely to be seen
repeating when used as a background image
- it weighs in at close to 20K
The Adobe Photoshop steps are these:
- reduce the image size somewhat
(setting the resolution to 72, width 800 or so)
-
Use the layers window found via
Window
Layers and
add a solid color layer (of a light, yellowish color)
"on top" of the image
- reduce the "opacity" of the solid color layer
from 100% to, say, 75% so that the original image starts to show through
- save the image "for web" as JPEG of low quality
as the file
bg.jpg in the
images subfolder
of composting.
The remaining steps should be accomplished (mostly) by adding style rules
to the document.
- We want the font to be sans-serif, 14pt.
- We want the table to be of fixed width of 600px and centered.
Use either the "align=center" or center
tags to achieve the centering effect.
-
We want 20px more between the top and the start of the content (there
are multiple ways to achieve this).
- Modify the paragraph appearance. We want:
- less space between paragraphs
- more space between lines within a paragraph
- initial indentation of the first line
-
Make bg.jpg the background image. Also try making it
it "fixed" to compare the different visual effect.
- Make the header color #c00
-
Make the "footnote" text at the bottom of a smaller proportional
font size and make it align to the right.
- We want the horizontal ruler's appearance
changed. Use these properties:
- background-color: set it to magenta (#f0f)
- border-width: set it to 0
- height: set it to desired value
© Robert M. Kline