Here is one way to do it.
If this is your HTML:
<div> <a href="#" class="background-image"> <img class="foreground-image" src="http://placekitten.com/200/100"/> </a> </div>
apply the following CSS rules:
div { border: 1px dotted blue; } .background-image { border: 1px dotted red; background-image: url(http://placekitten.com/200/50); background-position: center left; background-repeat: repeat-x; display: block; width: 500px; } .foreground-image { vertical-align: top; width: 200px; border: 0px; position: relative; z-index: -1; }
Adjust position: relative
on the image and fill the image deeper into the stacking order with z-index: -1
.
See demo at: http://jsfiddle.net/audetwebdesign/HUK28/
source share