Family Magazine

Responsive Youtube IFrame Embed

By Geoff Griffiths @mmatraining1980

Go to a YouTube video – on YouTube.com

  • Click “Share” then “Embed” and grab the code

Default Embed Code:

Responsive Youtube IFrame Embed
DEafult Youtube iframe embed HTML code



I changed the default width="560" at the start to width="100%"
Also added style="max-width: 600px;" - after allowfullscreen:


Responsive Youtube IFrame Embed
   

I can’t show an example unfortunately, as my Free WordPress.com blog doesn’t allow to add any code. The embed above isn’t fully responsive.


Back to Featured Articles on Logo Paperblog