![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
With this element you can create several layers of content on a page. These
layers can be stacked on top of each other, showing parts of underlying layers
through non-occupied space. You can control the order of the layers, the
position on the page and if a layer is visible or not.
The difference between the LAYER element and the
ILAYER element is that a layer defined with the
LAYER element is positioned relative to the containing layer, or the document
if it is the top layer. The position of a layer defined by an ILAYER element is
the natural position in the flow of the text, just like an image.
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
The attributes ABOVE, BELOW and Z-INDEX are mutually exclusive, so if you use this attribute, the attributes BELOW and Z-INDEX cannot be used.
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
The attributes ABOVE, BELOW and Z-INDEX are mutually exclusive, so if you use this attribute, the attributes ABOVE and Z-INDEX cannot be used.
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
The value is a set of 4 numbers, indicating in order, the left value, the top value, the right value, and the bottom value. The left and right values are specified as pixels in from the left, while the top and bottom values are specified as pixels down from the top of the containing document or layer.
Each of the 4 values are numbers of pixels. You can also specify the value as a set of 2 numbers, in which case the left and top values default to 0. For example:
clip="10,20"
is equivalent to
clip="0,0,10,20"
If you do not supply this attribute, the clipping rectangle of a layer is determined by the values of WIDTH and HEIGHT. By default, a layer expands to contain all of its content.
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
Note however that if the contents of the layer do not fit inside the specified height, the layer will expand its height to include all its contents.
The main purpose of the HEIGHT attribute is to act as the reference height for attribute values in its children layers that are specified using percentages.
This attribute is optional; by default, the layer height is the minimum height that contains all the layer contents.
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
For positioned layers the origin is the upper-left-hand corner of the document or containing layer, with coordinates increasing downwards and to the right.
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
You can use the layer's name to refer to the layer from within HTML and external scripting languages such as JavaScript.
This attribute is optional; by default, layers are unnamed.
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
The file specified by SRC can contain an arbitrary HTML document.
The source file can include JavaScript code. Any LAYER elements in the source file will be treated as child layers of the layer for which the source file is providing content.
The SRC parameter is particularly useful if you want to dynamically change the content of the layer. For example, a restaurant might have a web page that uses a layer to describe the special meal of the day. Each morning, after the chef has decided what the special is going to be for the day, he or she quickly edits the file "special.htm" to describe the meal.
The chef doesn't have to re-write the entire page just to update the information about the special of the day.
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
For positioned layers the origin is the upper-left-hand corner of the document or containing layer, with coordinates increasing downwards and to the right.
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
This attribute is optional. By default, a layer has the same visibility as its parent layer, that is, the value of the VISIBILITY attribute is INHERIT.
Remember that even if the visibility of a layer is set to SHOW, you will only be able to see the layer if there are no other visible, opaque layers stacked on top of it.
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
Note however that if the elements that cannot be wrapped, such as images, extend beyond the width specified, the actual width of the contents of the layer will expand accordingly.
This attribute is optional; by default, the layer contents wrap at the right boundary of the enclosing layer.
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
The attributes ABOVE, BELOW and Z-INDEX are mutually exclusive, so if you use this attribute, the attributes ABOVE and BELOW cannot be used.
![]() |
<A href="LAYER1.html">Take a look at the LAYER example</A>
|
![]() |
Take a look at the LAYER example |
![]() |
![]() |
![]() |