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.
thanks for sharing this nice tips with us
Comments are closed.