thejoker101
06-10-2003, 01:34 PM
I've never done much with the z-index as I've not seen any thing I could use it for before now. However, I've come across an instance where it is applicable ( at least I think so, feel free to offer up other ideas ). I have this set of code:
<img src="i/circle.gif" style="position:absolute;left:150px;z-index:-1;"><br>
<div style="border:solid black 1px; background-color:silver;color:black;padding:10px;z-index:10;margin-left:20px;">###<br/>###<br/>###<br/>###<br/>###<br/>###<br/>###</div>
<br/><br/>
<img src="i/circle.gif" style="position:absolute;left:150px;z-index:0;"><br>
<div style="border:solid black 1px; background-color:silver;color:black;padding:10px;z-index:10;margin-left:20px;">###<br/>###<br/>###<br/>###<br/>###<br/>###<br/>###</div>
The top one will put the image behind the text and behind all of my other div's. The second one will put it on top of my div. I want it to be just behind the div and above all else.
To see a working example of this, see my test page here: http://pyro.hostignition.com/~dionysus/the17thdegree/test6.html
That's probably the best place to see what's going on.
As soon as I set the z-index to a negative number it jumps behind everything, when I set it to any positive number it's on top of everything. Is this because I don't have z-index's set on anything else except the div it's supposed to be behind?
Thank you for your input.
- Asher
<img src="i/circle.gif" style="position:absolute;left:150px;z-index:-1;"><br>
<div style="border:solid black 1px; background-color:silver;color:black;padding:10px;z-index:10;margin-left:20px;">###<br/>###<br/>###<br/>###<br/>###<br/>###<br/>###</div>
<br/><br/>
<img src="i/circle.gif" style="position:absolute;left:150px;z-index:0;"><br>
<div style="border:solid black 1px; background-color:silver;color:black;padding:10px;z-index:10;margin-left:20px;">###<br/>###<br/>###<br/>###<br/>###<br/>###<br/>###</div>
The top one will put the image behind the text and behind all of my other div's. The second one will put it on top of my div. I want it to be just behind the div and above all else.
To see a working example of this, see my test page here: http://pyro.hostignition.com/~dionysus/the17thdegree/test6.html
That's probably the best place to see what's going on.
As soon as I set the z-index to a negative number it jumps behind everything, when I set it to any positive number it's on top of everything. Is this because I don't have z-index's set on anything else except the div it's supposed to be behind?
Thank you for your input.
- Asher