I used to use fitvid.js to make my videos responsive, but I recently discovered an awesome tip by Grafikart that I want to share.

You can basically make your video responsive with CSS only using padding-bottom.

First, wrap your iframe code in a tag with the class of your choice

Then, simply add this CSS snippet to your stylesheet

You can also automatize the process a little bit with jQuery to wrap all your videos automatically.

That’s it, folks! Simple as this.

One reply to “Make your Embed Videos Responsive with CSS”

Comments are closed.