CSS Enlarge Image on Hover
by btevfik
HTML
<div class="row portfolio-images">
<ul class="enlarge2">
<li><img src="http://www.thefaeriesandangelsmagazine.com/resources/VEN-virtual-enterprise-network-business-opportunities-small-fish_id799929_size485.jpg?timestamp=1267988673507" style="width:50px;height:50px;"/><span><img src="http://www.thefaeriesandangelsmagazine.com/resources/VEN-virtual-enterprise-network-business-opportunities-small-fish_id799929_size485.jpg?timestamp=1267988673507"/><br />
<div class="span1">Fish</div></span></li>
</ul>
</div>
CSS
ul.enlarge2{
list-style-type:none; /*remove the bullet point*/
margin-left:0;
}
ul.enlarge2 li{
display:inline-block; /*places the images in a line*/
position: relative;
z-index: 0; /*resets the stack order of the list items - later we'll increase this*/
}
ul.enlarge2 img{
background-color:#eae9d4;
padding: 6px;
-webkit-box-shadow: 0 0 6px rgba(132, 132, 132, .75);
-moz-box-shadow: 0 0 6px rgba(132, 132, 132, .75);
box-shadow: 0 0 6px rgba(132, 132, 132, .75);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.span1{
margin:0 auto;
display:block;
z-index:1;
height:10px;
width:100px;
padding: 10px;
font-family: 'Droid Sans', sans-serif;
font-size:.9em;
text-align: center;
-webkit-box-shadow: 0 0 20px rgba(0,0,0, .75));
-moz-box-shadow: 0 0 20px rgba(0,0,0, .75);
box-shadow: 0 0 20px rgba(0,0,0, .75);
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius:8px;
}
ul.enlarge2 span{
position:absolute;
left: -9999px;
background-color:white;
}
ul.enlarge2 li:hover{
z-index: 150;
cursor:pointer;
}
ul.enlarge2 span img{
padding:2px;
background:#ccc;
}
ul.enlarge2 li:hover span{
top: 100px; /*the distance from the bottom of the thumbnail to the top of the popup image*/
left: 0px; /*distance from the left of the thumbnail to the left of the popup image*/
}
ul.enlarge2 li:hover:nth-child(2) span{
left: -200px;
}
ul.enlarge2 li:hover:nth-child(3) span{
left: -200px;
}
ul.enlarge2 img, ul.enlarge span{
behavior: url(pie/PIE.htc);
}