Dynamic Layers > Setting layer properties

 

Setting layer properties

Use the Property inspector to specify the name and location of a layer as well as to set other layer options. To see all of the following properties, click the expander arrow in the lower right corner of the Property inspector.

Layer ID allows you to specify a name to identify the layer in the Layers panel and for scripting. Enter a name in the unlabeled box on the left side of the Property inspector. Use only standard alphanumeric characters for a layer name. Do not use special characters such as spaces, hyphens, slashes, or periods. Every layer must have its own unique name.

L and T (left and top) specify the position of the layer relative to the top left corner of the page or parent layer (if nested).

W and H specify the width and height of the layer. These values are overridden if the content of the layer exceeds the specified size.

If you have div or span set as the default tag, the default values for location and size are in pixels (px). You can also specify the following units: pc (picas), pt (points), in (inches), mm (millimeters), cm (centimeters), or % (percentage of the parent's value). The abbreviations must follow the value without a space: for example, 3mm. The Overflow setting controls how layers react when the content exceeds the layer's size.

Z-Index determines the z-index, or stacking order, of the layer. Higher-numbered layers appear above lower-numbered layers. Values can be positive or negative. It's easier to change the stacking order of layers using the Layers panel than to enter specific z-index values. See Changing the stacking order of layers.

Netscape layers (those with the layer or ilayer tag) can also be stacked relative to other layers on the page. When you select a Netscape layer, two additional options appear in the lower right corner of the Property inspector. Use the A/B option to select a relative stacking position and then choose the name of another layer from the pop-up menu directly to the right. (A specifies a layer above the current layer; B specifies a layer below the current layer.)

Vis determines the initial display condition of the layer (visible or not). Use a scripting language, such as JavaScript, to control the visibility property and dynamically display layer contents. Choose from the following options:

Default does not specify a visibility property, but most browsers interpret this as Inherit.
Inherit uses the visibility property of the layer's parent.
Visible displays the layer contents, regardless of the parent's value.
Hidden hides the layer contents, regardless of the parent's value. Note that hidden layers created with ilayer still take up the same space as if they were visible.

Bg Image specifies a background image for the layer. Click the folder icon to Browse to and select an image file, or type the path for the image in the text field.

Bg Color specifies a background color for the layer. Leave this option blank to specify a transparent background.

Tag determines the HTML tag to be used. span and div are recommended. layer and ilayer create Netscape Navigator layers, but are only viewable in Netscape Navigator 4 browsers.

Overflow determines what happens if the contents of a layer exceed its set size. Choose from the following options:

Visible increases the layer size so that all of the layer's contents ares visible. The layer expands downward and to the right.
Hidden maintains the layer's size and clips any content that doesn't fit. No scroll bars are provided.
Scroll adds scroll bars to the layer regardless of whether the contents exceed the layer's size. Specifically providing scroll bars avoids confusion resulting from the appearance and disappearance of scroll bars in a dynamic environment. This option works only in browsers that support scroll bars.
Auto makes scroll bars appear only when the layer's contents exceed its boundaries.

Clip defines the visible area of a layer and can be used to cut content from the edges of the layer. Specify values that represent the distance in pixels from the layer's boundaries. T (top) and L (left) settings are relative to the layer, not to the page.

Use Left, Top or PageX, PageY (layer and ilayer only) lets you position a layer in relation to its parent. The Left, Top option places the layer in relation to the top left corner of its parent. The PageX, PageY option places the layer in an absolute location relative to the top left corner of the page, regardless of the position of the parent layer.

Src (later and ilayer only) lets you display another HTML document within the layer. Click the folder icon to browse to and select the document, or type the path of the document. Note that Dreamweaver does not display this property in the Document window.

A/B (layer and ilayer only) specifies the layer above (A) or below (B) the current layer in the stacking order (z-index). Only layers previously defined in the document will appear in the list of layer names to the right of the A/B menu.