On my php page, I am dynamically visualizing thumbnails. To ensure that they are all the same size, I use the following method:
<a class="zoom" href="...">
<img src="thumb/default.png" width="130" style="background-image:url(thumb/<?php echo $images_jpg;?>);" class="centered" />
</a>
CSS
img.centered {
background-repeat: no-repeat;
background-position: center center;
}
/* 1 attempt */
a.zoom:hover {
background-image: url(thumb/zoom.jpg);
}
/* 2 attempt */
a.zoom img:hover {
background-image: url(thumb/zoom.jpg);
}
I am trying to display a different image on hover event, but it does not seem to work. Can anyone provide guidance on how to achieve this? Thank you.