My goal is to recreate the YouTube thumbnail with a timestamp at the bottom right corner of the image, like this:
However, I'm struggling to figure out how to overlay the timestamp on top of the image and position it correctly.
Here's the JSFiddle link for reference: http://jsfiddle.net/MgcDU/4162/
HTML:
<div class="container">
<div class="small-video-section">
<div class="thumbnail-container">
<img src="http://i2.ytimg.com/vi/yKWoPlL2B8I/mqdefault.jpg" width="220" />
</div>
<div class="thumbnail-time">
5:42
</div>
</div>
</div>
CSS:
.small-video-section {
height: 134px;
}
.thumbnail-container {
margin-top: 15px;
margin-right: 20px;
}
.thumbnail-last {
margin-top: 15px;
}
.thumbnail-time {
display: inline;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12px;
color: #ffffff;
background-color: #000000;
opacity: 0.8;
padding: 2px 4px 2px 4px;
}
Any assistance would be greatly appreciated!