chapter 12: layers: interactivity and animation
The first MTV generation has grown up—and discovered the Web. Unfortu-
nately, putting the average home page next to the average music video is like
pitting a minivan against a Maserati. If you want to keep restless eyes glued
to your site, adding attention-grabbing animation and interactivity may do the trick.
Using Behaviors (Chapter 11) and a clever design tool called layers, you can make
pictures dance across the screen, add pop-up tooltips to your links, and even create
Web page sticky notes that visitors can drag around the window. Without
Dreamweaver, such animation would require a complex mixture of HTML, pro-
gramming, and Cascading Style Sheets (Chapter 8) that could leave you crying into
your keyboard. You, however, as a Dreamweaver owner, can create these effects with-
out any assistance from therapy or antidepressants.
Tip: As when using any cool new technology, have mercy on your audience when adding interactive
effects. Make sure any animations you use contribute to the message of your site and don’t become
distracting gimmicks whose novelty wears off after the first viewing. Making a news bulletin wiggle across
the screen might look neat, but it’s pretty hard to read.
A layer is a rectangular container that holds other page material—images, text, form
elements, and even other layers. In this regard, it acts like a table cell (page 144). And
as with a cell, you can define a layer’s width and height and give it a background
color or image.
dreamweaver mx: the missing manual
But that’s where the similarities end. What really sets a layer apart from other page
elements is the way you can give it an exact position on a page. Want an image to
appear exactly 100 pixels from the top edge of the browser window and 200 pixels
from the left? Add a layer at that spot and insert an image in the layer—no jury-
rigged table scaffolding required.
Furthermore, because a layer uses both HTML and Ca