Image popup on mouseover/hover
-
I have a table set up with a list of items and I have been trying to have a ‘preview’ image to pop up on screen when the user hovers his mouse over an icon (in one of the columns). I’ve successfully got my popup image to pop up but I’m having a few problems with it – 1) the image isn’t popping up where I want it to and 2) sometimes the right column of my main page covers the popup image, meaning text and images in the right column will be overlayed on top. Hard to explain, easier to show. Check out this page, any help is appreciated:
usmicroscrew.com/standard-micro-fasteners/
This is the css that I pieced together:
#popup { color: #fff; background-color: #fff; } #popup a span { display: none; } #popup a:hover { background-color: #fff; } /* the IE correction rule */ #popup a:hover { color: #fff; background-color: #fff; text-indent: 0; /* added the default value */ } #popup a:hover span { display: block; position: fixed; top: 15%; left: 17%; width: 700px; margin: 0; padding: 10px; color: #000; font-weight: normal; background: #fff; text-align: left; border: 1px solid #000; }
And this is how I’m wrapping the image that I want the hover/popup to happen on
<div id="popup"> <a href="https://www.usmicroscrew.com/micro-screw-cad-files/M06-30-M-SS-P.pdf"> <img src="https://www.usmicroscrew.com/wp-content/uploads/pdf-download-icon.png" alt="" width="22" height="26" class="aligncenter size-full wp-image-568" /> <span><img src="https://www.usmicroscrew.com/micro-screw-cad-files/micro-screw-pics/M06-30-M-SS-P.JPG" alt="Standard Mini Fasteners Drawing Popup"></span> </a> </div>
Ideally I want to image popup to start just to the right of the mouseover link, like I’ve mocked up in this image below. Any help is appreciated.
Screenshot
- The topic ‘Image popup on mouseover/hover’ is closed to new replies.