Responsive YouTube Embed Code

.embed-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;
.embed-container iframe, .embed-container object, .embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
<div class='embed-container'>
<iframe src='YOUR_YOUTUBE_EMBED_URL' frameborder='0' allowfullscreen></iframe>

Using the code above with your YouTube embed code will provide you with a completely responsive video for your next blog post or update.

%d bloggers like this: