Nesting AP Divs

Nesting doesn’t necessarily mean that one AP div appears inside another; rather, it means that Dreamweaver writes the HTML for one AP div inside the code for another. The nested AP div itself can appear anywhere on the page. The main benefit of nested AP divs is that the parent AP div—the AP div that includes the HTML of one or more other AP divs—can control the behavior of its child AP divs.

Suppose you create one AP div, and nest two AP divs inside it. If you move the parent AP div on the screen, the two child AP divs follow it, which gives you an easy way to move several AP divs in unison. Furthermore, the parent AP div can control its children’s visibility. When you hide the parent AP div (see Visibility), the nested AP divs also disappear (unless you specifically set the nested AP divs’ visibility property to visible).

Tip

Dreamweaver’s factory settings hide a useful visual cue—“AP element” markers (see the “HTML position for AP div” marker in Figure 9-22). These markers identify where in a page’s code the HTML for the AP div appears. Since a nested absolutely positioned element is a tag whose code appears inside another absolutely positioned element—like inside the parent’s <div> tag—an AP element marker appears inside the parent AP div for each nested AP div. To turn on AP element markers, press Ctrl+U (⌘-U) to open the Preferences window, click the Invisible Elements category, and then turn on the “Anchor Points for AP Elements” checkbox. You also need to make ...

Get Dreamweaver CS5: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.