Jump to content

How to open div on top of an image?


ts2000abc

Recommended Posts

Well it's not too hard to create it yourself. The zoom and click to enlarge can be just another DIV above the image that is set to display: block when mouseover and display: none when mouseout. The animation, depending on how you like your effects, you can utilize jQuery or better yet scriptaculous. But you can make a quickie yourself with little to no animation. Create a div at the bottom of the page (above </body>) and style it to center itself on the middle of the page. If you want, be more technical and give it a semi-dark transparent background like a lightbox or in this case a blackbox :D. Anyways, for each image, give it an attribute that you can reference it by. Like ID is good. When clicked, grab the ID of the image and put the image into the div you created. Then just change width and height when zoomed or enlarged, etc.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.