HighDots Forums  

Re: Need help: a simple question about layers

alt.html.dhtml alt.html.dhtml


Discuss Re: Need help: a simple question about layers in the alt.html.dhtml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Randy Webb
 
Posts: n/a

Default Re: Need help: a simple question about layers - 12-06-2004 , 06:20 PM






TAM wrote:
Quote:
Hi,

I have a table and one of the table cell contains some text. Instead
of hyper linking that text I want to position a layer covering the
entire table cell. The purpose here is to let the user click anywhere
on the on the table cell instead of just the text. The alternative is
to turn text into image, but I want to keep text as text.
Or to use the onclick of the td tag. But why use tables for layout?

Quote:
Here is the code that I am using. Let me know if I am correct or doing
something wrong. I think I am doing something wrong because the layer
is getting inserting space in the html layout which I do NOT want.
<--snip-->

Quote:
td><div style="position: relative; width: 219px; height: 57px;
z-index: 1; left: 0px; top: 107px" id="layer1"
a href="#"><img src="images/transparent.gif" width="200" height="50"
border="0" /></a></div
This text should be a clickable…<br
ABCDEFG…<br>…XYZ</td
td><img src="images/spacer.gif" width="200" height="50" /></td
Position a div tag relative, inside the TD. Then position your image
absolute inside the relative div:

<td>
<div style="position:relative">
<div style="position: absolute; width: 219px; height: 57px;
z-index: 1; left: 0px; top: 0px" id="layer1">
<a href="#">
<img src="blank.gif" width="200" height="50" border="0" />
</a>
</div>
This text should be a clickable…<br>And now it is<br>
</div>
</td>


--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.