Over 15 years we helped companies reach their financial and branding goals. Beach Life Marketing is a values-driven and dedicated marketing agency.

Coding Tips

Create proportional, scaled and responsive iframes for youtube videos

Recently, I worked on a client website where it needed an embed youtube video on the product page. The embedding part wasn’t hard; the hardest part was getting the iFrame to be responsive just like the layout. One of the way that I found which worked quite well is by using the following code:

Hope this helps you when you are embedding video into your website using iFrame and need the iframe to be responsive.


References: http://flwebsites.biz/posts/proportional-responsive-iframes-youtube-videos