You can use either the Property inspector or the Layers panel to change the stacking order of layers by adjusting the z-index of each layer. The z-index determines the order in which layers are drawn in a browser. A layer with a higher z-index number appears to be laid atop layers with lower z-index numbers. Values can be positive or negative. This is particularly useful when you have overlapping layers and you need to specify which layer(s) will be atop others. It is also possible for more than one layer to have the same z-index number, in which case the layer that appears in the code first appears on top.
You will see the changes applied in the Layers panelthe class layer now appears between the om and textlayer layers. The z-index numbers on the Layers panel also change automatically. It can be easier to change the stacking order when you move layers in the Layers panel than it would be to change the z-index values yourself via the Property inspector because Dreamweaver automatically changes the z-index values. The class layer's z-index text field located on the Property inspector has changed from 4 to 2. Your document now looks similar to the example shown previously. Save this file and leave it open for the next exercise. |