HTML code for layers

HTML code for layers

When you place a layer in a document, Dreamweaver inserts the HTML tag for that layer in your code. By default, Dreamweaver creates layers using the div tag.

When you draw a layer using the Draw Layer tool, Dreamweaver inserts a div tag in the document and assigns the layer an id value (by default Layer1 for the first layer you draw, Layer2 for the second layer you draw, and so on). Later, you can rename the layer to anything you want using the Layers panel or the Property inspector. Dreamweaver also uses embedded CSS in the head of the document to position the layer, and to determine the layer’s exact dimensions.

The following is sample HTML code for a layer:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Sample Layers Page</title>
<style type="text/css">
#Layer1 {

} --> </style> </head> <body> <div id="Layer1"></div> </body> </html>

You can set properties for layers on your page, including x and y coordinates, z-index (also called the stacking order), and visibility. For more information, see Setting layer preferences and properties.

Related topics

  • Understanding layers

Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Laying Out Pages with CSS
Managing Templates
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly