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

Applying the Layer Style

In most cases, a layer includes a variety of HTML elements—images, paragraphs, headlines, and so on. Unlike a normal style that you usually apply to a single tag or even a single word, all the elements inside a layer are wrapped inside a <div> tag. Dreamweaver includes a simple tool to make adding the <div> tag easy.

Available from the Layout tab of the Insert bar, the Insert Div Tag tool is a one-click tool for wrapping content in a CSS style (Figure 8-5). To use it, select all of the content you want to include in the layer and then click the button on the Insert bar (alternatively, you can choose Insert Layout Objects Div Tag). Either way, the Insert Div Tag window opens (see Figure 8-6).

The Insert Div and Draw Layer tools aren't available in Layout mode. If these tools are grayed out on the Insert bar, click the Standard button.

Figure 8-5. The Insert Div and Draw Layer tools aren't available in Layout mode. If these tools are grayed out on the Insert bar, click the Standard button.

Once you've applied an ID style to add a layer to the page, that ID's name no longer appears in the ID menu on subsequent visits to this dialog box. That's because you can use an ID only once per page.

Figure 8-6. Once you've applied an ID style to add a layer to the page, that ID's name no longer appears in the ID menu on subsequent visits to this dialog box. That's because you can use an ID only once per page.

You can select the name of a class or ID style from either the Class or ID menu. In the case of a layer, you'll most likely select the name of the layer style you created from the ID menu. Dreamweaver 8 adds ...

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