Dreamweaver

Work with nested AP Divs

A nested AP Div is an AP Div that has code contained within the tags of another AP Div. For example, the following code shows two AP Divs that are not nested, and two AP Divs that are nested:

<div id="apDiv1"></div>
<div id="apDiv2"></div>
<div id="apDiv3">
	<div id="apDiv4"></div>
</div>

The graphical depiction for either set of AP Divs might look as follows:

Nested div tags, illustrated with anchor points.

In the first set of div tags, one div is sitting on top of the other on the page. In the second set, the apDiv4 div is actually inside of the apDiv3 div. (You can change AP Div stacking order in the AP Elements panel.)

Nesting is often used to group AP Divs together. A nested AP Div moves with its parent AP Div and can be set to inherit visibility from its parent.

You can enable the Nesting option to automatically nest when you draw an AP Div starting inside another AP Div. To draw inside or over another AP Div, you must also have the Prevent overlaps option deselected.

Draw a nested AP Div

  1. Make sure Prevent overlaps is deselected in the AP Elements panel (Window > AP Elements).
  2. In the Layout category of the Insert bar, click the Draw AP Div button .
  3. In the Document window’s Design view, drag to draw an AP Div inside an existing AP Div.

    If Nesting is disabled in AP Elements preferences, Alt‑drag (Windows) or Option-drag (Macintosh) to nest an AP Div inside an existing AP Div.

    Nested AP Divs may appear differently in different browsers. When you create nested AP Divs, check their appearance in various browsers frequently during the design process.

Insert a nested AP Div

  1. Make sure Prevent overlaps is deselected.
  2. Place the insertion point inside an existing AP Div in the Document window’s Design view, then select Insert > Layout Objects > AP Div.

Nest an existing AP element inside another using the AP Elements panel

  1. Select Window > AP Elements to open the AP Elements panel.
  2. Select an AP element in the AP Elements panel, then Control‑drag (Windows) or Command-drag (Macintosh) the AP element to the target AP element in the AP Elements panel.
  3. Release the mouse button when the name of the target AP element is highlighted.

Nest AP Divs automatically when you draw an AP Div inside another AP Div

 Select the Nesting option in the AP Elements preferences.