Responsive wrapper for you tube and vimeo embeded videos

This is a quick piece of css code that you can use to create a responsive youtube or vimeo video.

<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style>

<div class=’embed-container’> <iframe src=”https://player.vimeo.com/video/unique_link_here” frameborder=”0″ webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>

Leave a Comment