Changes

Jump to: navigation, search

JavaScript and CSS - Dynamic Styles and Layers

34 bytes added, 14:57, 19 March 2009
Using Overlaying Layers
This will display a web page similar to:
 
<google>ADSDAQBOX_FLOW</google>
[[Image:Javascript layers 1.jpg]]
 
We will now use the ''z-index'' property to control which layer appears on top. The ''z-index'' property contains a numerical value which specifies the position of the layer relative to the browser (which is considered to be layer 0). The higher the z-index setting for a layer, the closer to the top of overlapping layers it will appear. For example, to get our ''layer1'' layer to appear above ''layer2'' in the above example we would need to set the z-index property of ''layer1'' to 2. The following extends our example to include z-index values for each layer. In this case we will make sure that layer1 has a higher value than layer2 so that layer1 appears on top of layer 2:

Navigation menu