Dreamweaver

Insert div tags

You can use div tags to create CSS layout blocks and position them in your document. This is useful if you have an existing CSS style sheet with positioning styles attached to your document. Dreamweaver enables you to quickly insert a div tag and apply existing styles to it.

  1. In the Document window, place the insertion point where you want the div tag to appear.
  2. Do one of the following:
    • Select Insert > Layout Objects > Div Tag.

    • In the Layout category of the Insert bar, click the Insert Div Tag button .

  3. Set any of the following options:
    Insert
    Lets you select the location of the div tag (either at the insertion point, before or after the tag, or before or after the start of the tag) and the tag name if it is not a new tag.

    Class
    Displays the class style currently applied to the tag. If you attached a style sheet, classes defined in that style sheet appear in the list. Use this pop‑up menu to do any of the following:
    • Select the style you want to apply to the tag.

    • Select None to remove the currently selected style.

    • Select Attach Style Sheet to open a dialog box that lets you attach an external style sheet.

    Div ID
    Lets you change the name used to identify the div tag. If you attached a style sheet, IDs defined in that style sheet appear in the list. IDs for blocks that are already in your document are not listed.
    Note: Dreamweaver alerts you if you enter the same ID as another tag in your document.

    Edit CSS
    Opens the CSS Styles panel.

  4. Click OK.

    The div tag appears as a box in your document with placeholder text. When you move the pointer over the edge of the box, Dreamweaver highlights it.

    If the div tag is absolutely positioned, it becomes an AP element. (You can edit div tags that aren’t absolutely positioned.)