Embed the YouTube video within a container the same as the example below:

<div class="container">
<iframe src="http://www.youtube.com/watch?v=W1xZMfpuuZc?rel=0&showinfo=0" frameborder="0" allowfullscreen class="video"></iframe>

Add the following to css:

.container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
.video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
Written by Matt Cooper
Hi, I'm Matt Cooper. I started this blog to pretty much act as a brain dump area for things I learn from day to day. You can contact me at: matt@linuxtutorial.co.uk.