Thanks for replying - I really appreciate it!
Here is the whole example I found in a book:
- <HTML>
-
<HEAD>
-
<STYLE type="Text/css">
-
#layer1 {
-
position: absolute;
-
top: 50px;
-
left: 50px;
-
width: 200px;
-
height: 100px;
-
z-index: 0;
-
background-color:red}
-
#layer2 {
-
position: absolute;
-
top: 75px;
-
left: 90px;
-
width: 150px;
-
height: 100px;
-
z-index: 10;
-
background-color:yellow}
-
</STYLE>
-
</HEAD>
-
<BODY>
-
<div id="layer1" onClick="document.getElementById('layer1').style.zindex='20'"></DIV>
-
<div id="layer2" onClick="document.getElementById('layer1').style.zindex='0'"></DIV>
-
</BODY>
-
</HTML>
It displays the two layers correctly as such.
What I expected to happen is that the red layer would come onto the top when I click on it and vice versa.
This is of course just an example. I would have text within the layers for the visitor to read so the layers would naturally be larger.
The idea is to avoid having to scroll at all.
I would also like to use more than two layers - at least five.
However, it does not seem to work as explained in the book ...:) I have checked it a dozen of times to make sure I copied it correctly but but ...who knows ...
I hope this clarifies it! Please let me know if more info is needed.
Best wishes
Rolf