For way more details about the LAYER tag, see Part 2, Positioning HTML Content in Dynamic HTML in Netscape Communicator.
ID="layerName"
Layer Syntax
<LAYER>
ID="layerName
"
LEFT="pixelPosition
"
TOP="pixelPosition
"
PAGEX ="pageX
"
PAGE"="pageY
"
SRC="file
"
Z-INDEX="n
"
ABOVE="layername
"
BELOW="layername
"
WIDTH="width
"
HEIGHT="height
"
CLIP="n,n,n,n
"
VISIBILITY="visibility
"
BGCOLOR="color
"
BACKGROUND="imageURL
"
OnMouseOver="JScode
"
OnMouseOut="JScode
"
OnFocus="JScode
"
OnBlur="JScode
"
OnLoad="JScode
"
</LAYER>
specifies the name of the layer, enabling other layers and JavaScript scripts to refer to it.
LEFT="pixelPosition" and TOP="pixelPosition"
specify the horizontal and vertical positions of positioned layers or the relative horizontal and vertical positions for inflow layers.
PAGEX and PAGEY
specify the horizontal and vertical positions of the layer relative to the document's window.
SRC="file"
specifies the pathname of a file that contains HTML-formatted content for the layer.
Z-INDEX="n"
specifies the stacking order of a layer. Allows a layer's z-order to be specified in terms of an integer. Layers with higher numbered values are stacked above those with lower ones. Only positive Z-INDEX values are allowed. The use of this attribute cannot be combined with the use of the ABOVE or BELOW attributes.
ABOVE="layername"
specifies the layer immediately on top of a newly created layer in the stacking order; that is, the new layer is created just below the layer specified by layername. The use of this attribute cannot be combined with the use of the BELOW or Z-INDEX attributes.
BELOW="layername"
identifies the layer immediately beneath the newly created layer in the stacking order; that is, the new layer is created just above the layer specified by layername. The named layer must already exist. The use of this attribute cannot be combined with the use of the ABOVE or Z-INDEX attributes.
WIDTH="width"
specifies the width of the layer's content. It controls the right margin for wrapping purposes. The value can be expressed as an integer pixel value or as a percentage of the width of the containing layer.
HEIGHT="height"
specifies the height of the layer's clipping region and serves as the reference for setting the relative height of children layers. The value can be expressed as an integer pixel value or as a percentage of the height of the containing layer (or of the window for a top-level layer).
CLIP="n,n,n,n"
specifies the clipping rectangle (viewable area) of the layer, which can be less than the width and height of the content of the layer. The value is a set of four numbers. Each of the four values represents numbers of pixels.
VISIBILITY
specifies whether the layer is visible or not. A value of SHOW shows the layer. A value of HIDDEN hides the layer. A value of INHERIT causes the layer to have the same visiblity as its parent layer.
BGCOLOR="color"
specifies the background color of the layer. See Color Units for information about color values.
BACKGROUND="imageURL"
specifies an image to use as the background.
OnMouseOver="JScode", OnMouseOut="JScode"
are JavaScript event handlers that are invoked when the mouse cursor enters or leaves the layer. For information about JavaScript, see the JavaScript Guide or the JavaScript Reference.
OnFocus="JScode", OnBlur="JScode"
are JavaScript event handlers that are invoked when the layer gets or loses keyboard focus.
OnLoad="JScode"
is an event handler invoked when the layer is loaded.
<LAYER ID=layer1 TOP=250 LEFT=50 WIDTH=200 HEIGHT=200 BGCOLOR=RED>
<P>Layer 1</P>
</LAYER>
<LAYER ID=layer2 TOP=350 LEFT=150 WIDTH=200 HEIGHT=200 BGCOLOR=BLUE>
<P>Layer 2</P>
</LAYER>
<LAYER ID=layer3 TOP=450 LEFT=250 WIDTH=200 HEIGHT=200 BGCOLOR=GREEN>
<P>Layer 3</P>
</LAYER>
The file position.htm shows this example in action in a separate window.
<ILAYER>
see the attributes for LAYER at
Layer Syntax</ILAYER>
<P>Notice that the page is going along here as usual.
But now I want a
<ILAYER TOP=20 LEFT=30>series of words </ILAYER>
that are offset from their natural position.</P>
The file position.htm shows this example in action in a separate window.
<NOLAYER> ... </NOLAYER>
<LAYER SRC=layerContent.html></LAYER>
<NOLAYER>
This page would show some really cool things if you had a browser
that supports the LAYER tag.
</NOLAYER>
Last Updated: 11/19/97 22:46:33