youtube embed responsive

How to make Youtube Iframe Responsive

March 5, 2016 2:45 pm Published by Leave your thoughts

The default Youtube video iframe embed code is anything but elegant and will break most responsive web designs if you try to embed a Youtube video on your website. Fortunately there’s a workaround for everything and we can easily turn any Youtube embed responsive using some simple CSS magic. Here’s how: Youtube embed responsive When you use the original iframe embed code the result may look something like this, where the red box is just a normal wrapper and our video is breaking outside of it: To counter this, the first thing we do is remove the fixed width and height... View Article