Wisey Posted March 21, 2011 Share Posted March 21, 2011 I'm not sure if this is possible or not, but basically I have a div with absolute position, behind some other divs. In this div there is another div with a link in it. You can see the link obviously, there is nothing on top of it other than an empty div or two, but you can't click it. Is there a way that I can bring this div to the front, while still keeping it in the div that is behind everything - so that the link becomes clickable.The reason for this is because the div in the background is linked to some JavaScript that fades between the divs with in it. I want the link to change with the div, if that makes sense.Hope that is clear enough, I can provide the code if need be, but I thought it would be simpler to explain in terms of what is happening rather that - maybe I'm wrong!Thanks for any help in advance!- Wisey Link to comment Share on other sites More sharing options...
cousineaug Posted March 21, 2011 Share Posted March 21, 2011 I'm not sure if this is possible or not, but basically I have a div with absolute position, behind some other divs. In this div there is another div with a link in it. You can see the link obviously, there is nothing on top of it other than an empty div or two, but you can't click it.this simple example seems to work<html> <head> <title>web</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> .behind{ position:absolute; top: 0px; left: 0px; z-index: 10;}.main{ z-index: 20;}</style> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div class="main">this is the main body<br><br>this is the main body</div><div class="behind"><br>there is some text here behind the <a href="http://google.ca">main div</a></div></body> </html> post an example of your code..Guy Link to comment Share on other sites More sharing options...
Wisey Posted March 23, 2011 Author Share Posted March 23, 2011 Thanks! That helped, the problem was because a few different div's within div's some of them with different positions and one of the main div's had a z-index but no position, so it wasn't taking effect.Anyway, I've cleaned it up now and got it working. Thanks for the help! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.