I am learning how to build a website using Dreamweaver CS6. I wanted to make a photo gallery that shows thumbnails on the page, but when you roll the cursor over them, the screen displays a full-size image on the left and slightly lower than the thumbnail. Here is what I found while searching on the Internet (it was probably found here, but I donโt remember who posted it, so if you posted it, it all depends on you).
I got this in my HTML code:
<table> <tr> <td> <a class="thumbnail" href="#thumb"> <img src="productURL" width="100px" height="142px" border="0" /> <span> <img src="productURL" /> <br /> <font face="arial">productname </span></a> </font> </td> <td> <a class="thumbnail" href="#thumb"><img src="productURL" width="100px" height="142px" border="0" /><span> <img src="productURL" /><br /><font face="arial"> productname</span></a></font> </td> <td> <a class="thumbnail" href="#thumb"><img src="productURL" width="100px" height="142px" border="0" /><span> <img src="productURL" /><br /><font face="arial"> productname</span></a></font> </td> <td> <a class="thumbnail" href="#thumb"><img src="productURL" width="100px" height="142px" border="0" /><span> <img src="productURL" /><br /><font face="arial"> productname</span></a></font> </td> </tr> <table>
And then this is on my CSS:
.thumbnail{ position: relative; z-index: 0; } .thumbnail:hover{ background-color: transparent; z-index: 50; } .thumbnail span{ position: absolute; background-color: lightyellow; padding: 5px; left: 1000px; border: 1px dashed gray; visibility: hidden; color: black; text-decoration: none; } .thumbnail span img{ border-width: 0; padding: 2px; } .thumbnail:hover span { visibility: visible; top: 300px; left: 107px; }
I thought this was pretty good code, however I can't figure out how to make the image pop up next to the thumbnail. I tried to create a "subclass" called "span_2", but it did not exit correctly and messed up the whole page.
I think this is a big question, but I need help. This week I started playing with HTML ...
EDIT
Is there any function where I can select the location of the thumbnail and set the image to be displayed right next to it?
Pedro source share