There are a few different ways you can achieve this effect. One option is to create a div element that is the same size as your image and center it on the page. You can then choose to either set the image as the background of the div or add an <img>
tag within the div with position: absolute
.
Here's an example using the first method:
HTML:
<div id="pictureContainer">
Text placed over the image.
</div>
CSS:
#pictureContainer {
width: 300px;
height: 150px;
background: url('https://www.example.com/image.jpg');
margin: 0 auto;
left: 0;
right: 0;
padding: 20px 0 0 10px;
}
You can view a demonstration of this in action on JSFiddle here: http://jsfiddle.net/ABCD123/