Purpose: when I find the "item" image, I want the "play" image to appear in the center of the "div" of the div image. I have done the following:
play.img overrides itemImage.img
HTML:
<div class="itemsContainer"> <img src="/images/G1.jpg"/> <div class="playy"> <img src="/images/playy.png"/> </div> </div> <div class="itemsContainer"> <img src="/images/B1.jpg"/> <div class="playy"> <img src="/images/playy.png"/> </div> </div> <div class="clear">
CSS
.itemsContainer { float: left; width : 300px; height : 300px; margin-left : 2px; } .itemsContainer img { width : 300px; height : 175px; margin-bottom : -115px; z-index : -1; } .play img { position : relative; width : 50px; height : 50px; z-index : 100; margin : 0 0 50px 125px; opacity : 0.0 ; } .itemsContainer img:hover { opacity : 0.8; }
With the above code, the βplayβ image only appears when I am on div.play, instead I want the βplayβ image to appear when I hover over .itemContainer.img
How can I create a "play" image by hovering over itemImage.img ??
Link: http://www.itsalif.info/content/show-play-icon-mouse-over-thumbnail-using-css
for some reason I donβt want to use the βaβ tag, and I also wanted to know what I am doing wrong?
http://jsfiddle.net/e6Lav/5/ -- Problem http://jsfiddle.net/2uJKR/11/ -- Solution
source share