CSS for Resizing Video

Just a handy chunk of CSS to make your video embeds behave better. It’s out there but not a bad thing to spread farther.

Comments on this post

  1. CogDog said on February 3, 2016 at 7:36 am

    I’ve used very similar css before- note that the padding-bottom value works for landscape oriented videos but if embedding a flipped phone video you need a value like 8o% (I’ve managed by pulling the selector out of the container class and using two other additional classes for .portrati and .landscape

    In WordPress I use the Fluid Video embeds lugin https://wordpress.org/plugins/fluid-video-embeds/ that adds the fluid sizing to suit embeds. I only had one them where it failed (I think it was already applying it)