PCHomepage
Programmer
I'm using CSS for mouse-overs to make a larger version of an image appear but I am having trouble getting it to go where it should! They seem to pop up wherever they want. The HTML is:
. . . and the CSS is:
Perhaps I've made it overly-complicated and something is cancelling out what's needed!
HTML:
<a class="thumbnail" href="#thumb"><img src="/images/photoalbums/35/thumbnails/$_19.jpg" width="250" height="188" border="0" /><span><img src="/images/photoalbums/35/$_19.jpg" width="500" height="375"></span></a>
. . . and the CSS is:
CSS:
.thumbnail {
position: relative;
z-index: 49;
}
.thumbnail:hover {
background-color: transparent;
}
.thumbnail span { /*CSS for enlarged image*/
background-color: lightyellow;
padding: 5px;
border: 1px dashed gray;
visibility: hidden;
}
.thumbnail span img { /*CSS for enlarged image*/
position: absolute;
border-width: 20;
margin-top: 10px;
width: 100%;
margin-left: auto;
margin-right: auto;
float: center;
clear: all;
border: 2px solid gray;
padding: 2px;
z-index: 50;
clear: all;
}
.thumbnail:hover span { /*CSS for enlarged image on hover*/
visibility: visible;
display: block;
}
Perhaps I've made it overly-complicated and something is cancelling out what's needed!