CSS add text on top of image

Putting the image in as a background image of the wrapping div would be easier, but to add text on top of image or background image, position absolute needed.

.image { 
   position: relative; 
   width: 100%; /* for IE 6 */
}

.text_class { 
   position: absolute; 
   top: 200px; 
   left: 0; 
   width: 100%; 
}

By Keenlio, March 28, 2014

What do you think?

Leave a Reply

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


3 × = twenty four

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>