lundi 12 mai 2014

Make image link override background image on top of it


Vote count:

0




I have this div block which shows a preview image to a video (YouTube), problem is that this preview thumbnail generated by CMS, it doesn't give it that YouTube play icon in the middle of it, so it doesn't look like a video, but just a plain image.


So I came up with a solution (top answer CSS show div background image on top of other contained elements), by adding an empty span and giving it a background, that YouTube play icon and position absolute and positioning it in the middle of that image preview thumbnail. Now, meanwhile all looks greate, the problem is that background is not a link, the thumbnail is a link to the video, so that transparent icon hides the thumbnail link below it.


enter image description here



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire