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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking Layers to images

Status
Not open for further replies.

Sarky78

Programmer
Oct 19, 2000
878
GB
I have seen somewhere (really wish i had added it to favourites) a page that showed how to lock a layer to an element on the page. It could be anything as long as it had a unique name. i seem to rememeber that it used ID to identify the element and then used the getElementByID to find where the element was on the page.

Has anyone seen anything like this/got an example of how to do this.

I want to use this so that, I don't have to worry about different screens resolutions, as the code will position the layer dependant on where the image/whatever appears on the page

TIA

Tony
 
Cool thanks for the response, however this isn't really what i am looking for.

what i had in mind was:

<img src=&quot;whatever.gif&quot; id=&quot;anImage&quot;>

Now what i want to be able to do is to lock a layer to this image, no matter where i move it to on the page. The site that I have in mind for using this on is going to be in multi languages so the navigation element in one language won't be in the exact same spot as the element in the other language.

I think if memory serves it has something to do with the getElementbyID and the top and left of that element to be able to position it.

anyone done anything like this?
Is this the best way to go about this, or am i just over complicating things?

TIA

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top