Main menu
WalkswithMeCssImage Overlay using Css

Image Overlay using Css

The Image Overlay using Css is simple and easy to integrate . This is only a basic integration of one image on the top of another image using Css. Sometime we required some play button on the top of a thumbnail or something like that. So the whole idea is to show a play button on the top of another image with its center like below.

Image Overlay using Css

Image Overlay using Css

The script used for creating such an image is very simple you have to create a file index.html and have the following codes on its header section ie, inside head tag.

float:left; /* important */
position:relative; /* important(so we can absolutely position the description div */
position:absolute; /* absolute position (so we can position it where we want)*/
bottom:113px; /* position will be on bottom */
/* styling bellow
font-family: 'tahoma';
opacity:0.6; /* transparency
filter:alpha(opacity=60); /* IE transparency */

Then the body part of the index.html should have the following codes.

<div class='wrapper'  style="margin-left:300px;">
<img src='image_test.jpg' height="276" width="425" />
<div class='description'>
<div id="description_content"><img src="play_button.png" alt="Play" height="50" width="50" /></div>

Yes its Done ! now you have integrated the image overlay using css or you can place a play button on the top of another image. And its compatible for all browsers.Would you like to see demo ? click the link below.

demo_image How to create such an image dynamically ? will coming soon 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *