Written by: John | 17th Feb 2017
Get a full size youTube video background
Apply the styles below to use a full width 16:9 ratio video in your web page.
#videoWrapper { position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 0; height: 0; } #videoWrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
<div id="videoWrapper"> <!-- Copy & Pasted from YouTube --> <iframe width="560" height="349" src="http://www.youtube.com/embed/VID_ID?rel=0&controls=0&showinfo=0&rel=0&autoplay=1&loop=1&hd=1" frameborder="0" allowfullscreen></iframe> </div>