Tile: text over image
HTML
<div class="tile">
<div class="tile-image"><img src="http://loremplllixel.com/400/200" /></div>
<div class="tile-content">
<h3>Cras justo odio, dapibus ac facilisis in, egestas eget quam.</h3>
<p>Maecenas sed diam eget risus varius blandit sit amet non magna. Sed posuere consectetur est at lobortis. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
CSS
.tile {
border: 1px solid #e1e1e1;
width: 400px;
height: 200px;
overflow: hidden;
position: relative;
}
.tile-image {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 0;
}
.tile-content {
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 50%;
box-sizing: border-box;
padding: 5px;
color: #fff;
text-shadow: 0px 1px 3px rgba(0,0,0,0.7);
z-index: 1;
}
.tile-content:before {
content: '';
display: block;
position: absolute;
top: 0;
right: 0;
left: -38%;
bottom: 0;
z-index: -1;
background: rgba(0,0,0,0);
background: -moz-linear-gradient(left, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
background: -webkit-gradient(left top, right top, color-stop(0%, rgba(0,0,0,0)), color-stop(100%, rgba(0,0,0,0.65)));
background: -webkit-linear-gradient(left, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
background: -o-linear-gradient(left, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
background: -ms-linear-gradient(left, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
background: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#000000', GradientType=1 );
}