Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link Under Div Layer Not Working 1

Status
Not open for further replies.

overyde

Programmer
May 27, 2003
226
ZA
Hi,
Is there a way to make a link under a div layer active?
Really been struggling with this!
Code:
<body bgcolor="#000000" style="margin-bottom: 0px; margin-top: 0px; margin-left: 0px; margin-right: 0px;">
<div id=layer2 style="position:relative; width:100%; height:100%; margin-bottom: 0px; z-index:5; padding:0px; visibility: visible;">
	<center>
		<table width="100%" height="100%" padding="0" cellspacing="0">
			<tr>
				<td valign="bottom" align="center" width="100%" height="100%">
					&nbsp;
				</td>
			</tr>
		</table>
	</center>
</div>
	
<div id=layer1 style="position:absolute; top: 0; width:100%; height:100%; margin-bottom: 0px; z-index:4; padding:0px; visibility:visible;">
	<table width=100% height="100%" bgcolor="#C0C0C0" border="0">
		<tr>
			<td width="100%" align="center">
				<table>
					<tr>
						<td align="center">
							<a href="layers.html">Test Here</a>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td width="100%" height="34" bgcolor="#000000">&nbsp;</td>
		</tr>
	</table>
</div>

Reality is built on a foundation of dreams.
 
Why put a layer on top of another if you want the elements of the lower layer to be accessible? Why not just put active or accessible elements on the top layer?

I think you are swimming against the current here ...

Perhaps, your struggle is with your concept or idea behind your coding. What exactly is it you want to accomplish?

Regards,
 
There is a plausible reason here. I'm working with a developer utilising a gis system. His section of the site will be pulled in by means of an iframe. The lower section of the screen will have a flash menu to interact and call the relevant gis screens as applicable. The flash has a rollout menu so therefore needs to be able to rest above the gis system whilst still allowing control of the gis system.

Reality is built on a foundation of dreams.
 
Sorry, it still makes no sense. Should the flash menu not be always on a higher z-level than the iframe with the other information? Since it is either not interfering with the iframe (when the menu is not rolled over) or it should be above the content of the iframe (when the menu is rolled over)? The only thing you would need to do is not make the flash fill the entire screen.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Sorry guys...but we're getting off topic here. What I really want to know is what my original post was. Is it possible to have the links on the lower layer active when there is a layer above them? If it is possible then I how, if not then I will make another plan.

Reality is built on a foundation of dreams.
 
Thanks mate.
The design has been approved without the consultation of a developer/scripter so we have a nearly impossible design to implementation aspect. I have a GIS system that needs functionality (i.e. I can not put it into a lower layer as links will then be inactive) but have a design for a flash menu that needs a large amount of screen space and will roll over the gis system once it has a mouse-over call(think along the lines of the "Start" menu in windows or see unfortunately the client does not have the budget to build the GIS completely in flash and therefore have to use an existing structure to be integrated).
Do you know if there is a way then to pull a web page into flash (i.e. use an iframe idea in flash) as I need to make the two systems merge together almost seamlessly?

Reality is built on a foundation of dreams.
 
Thanks...but wouldn't you need to put the flash in a layer?

Reality is built on a foundation of dreams.
 
Make the container 1px high (or similar) with the Flash absolutely positioned inside it. Then the Flash can expand outside of the container, but because of wmode and the container having only 1px of height, you'll be able to click "under" it.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Unfortunately it seems that the container always seems to take on the size of the flash. And once again if the z-index is higher than the iframe i need to bring in then i can not click on the details in the iframe. GRRR!

Reality is built on a foundation of dreams.
 
There is one possible alternative I can think of. Not sure but I think you can use JS to monitor cursor position within a layer and trigger actions based on X,Y coordinate of the mouse when clicked over a given layer.

This is the same concept used when coding drag and drop using XHTML.

The question I have to this concept is positioning of the upper layer in relation to the lower layer. For this to work, the X,Y coordinates used to define the 'hot spots' will have to be the same no matter what the browser is set to. In other words, expect the unexpected and have a working solution for it.

If positioning is not an issue, this then may be your workaround.

What say you?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top