O'Reilly logo

Dreamweaver 8: The Missing Manual by David Sawyer McFarland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Nesting Layers

Nesting doesn't necessarily mean that one layer appears inside another layer; rather, it means that the HTML for one layer is written inside the code for another layer. The nested layer itself can appear anywhere on the page (see Figure 8-11). The main benefit of nested layers is that the parent layer—the layer containing the HTML of one or more other layers—can control the behavior of its child layers.

For example, suppose you create one layer and nest two layers inside it. If you move the parent layer on the screen, the two child layers follow it, which gives you an easy way to move several layers in unison. Furthermore, the parent layer can control the visibility of its children. When you hide the parent layer (see Section 8.3.1.3), the nested layers also disappear (unless you've specifically set the nested layers' visibility property to visible).

Tip

Dreamweaver 8's factory settings hide a useful visual cue—Layer markers (see Figure 8-7). These identify where in the code the HTML for the layer appears. Since a nested layer is a layer whose code appears inside the parent layer's code—for example, inside the <div> tag—a Layer marker appears inside the parent layer for each nested layer. To turn on the Layer marker feature, press Ctrl+U (

image with no caption

-U) to open the Preferences window; click the Invisible Elements category, and then turn on the Anchor Points for Layers checkbox. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required