HTML and CSS Reference
In-Depth Information
<layer>
<layer name=text left=0 top=0>
<h1>Introduction to Kumquat Lore</h1>
</layer>
<layer name=shadow above=text left=2 top=2>
<h1><font color=gray>Introduction to Kumquat Lore</font></h1>
</layer>
</layer>
The
above
attribute in the layer named
shadow
tells Netscape 4 to position
the shadow layer so that the layer named
text
is above it. The effect is
identical to
Figure H-9
.
The
above
and
below
attributes can get confusing when you stack several
layers. We find it somewhat easier to use the
z-index
attribute for keep-
ing track of which layers go over which. With
z-index
, you specify the
order in which Netscape stacks the layers: higher
z-index
value layers
are put on top of lower
z-index
value layers.
For example, to create our drop shadow using the
z-index
attribute, we
would use the following:
<layer>
<layer left=0 top=0 z-index=2>
<h1>Introduction to Kumquat Lore</h1>
</layer>
<layer left=2 top=2 z-index=1>
<h1><font color=gray>Introduction to Kumquat Lore</font></h1>
</layer>
</layer>
Again, the effect is identical to
Figure H-9
. Normally, Netscape 4 would
display the second layerthe gray one in this caseon top of the first layer.
But because we've given the gray layer a lower
z-index
value, it is
placed behind the first layer.