Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Div layers, and drag layer script

    Hi,

    I have a page with two layers (in div tags). The bottom layer has an image which has a javascript drag script linked to it so that the user can drag the image around the page.
    The layer above has a big rectangular gif with a transparent circle in the center, so that the image below shows as if looking through a circular hole.

    Now the problem quite obviously is that with the layer on top, you can't drag the lower layer about anymore.

    I've been trying to think/search for a way to get round it, but can't

    Any advice is greatly appreciated,
    Thanks,
    Dave

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Perhaps set the z-index higher on hover?

  • #3
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi, and thanks for the reply.

    I need the z-index of the draggable layer lower than the masking gif file.
    It's a "telescope view" simulator, where the picture in the lower layer is the object in space, and the big black gif with the transparent circle in the middle makes it look like the view with a telescope.

    Is there any way to link the positions of two layers? So maybe I could have a blank layer with a higher z-index than both, which when dragged will move the bottom layer too?

    Thanks again,
    Dave


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •