YouTube Full Screen – Javascript & CSS

I’m sticking this js/css combo in a number of the WordPress themes we’re building.

It’s two pieces, a javascript piece that finds the YouTube videos and wraps them in a div and a CSS Piece that makes the videos full size for the enclosing div. It stops overflows from getting ugly and expands small embeds (via oembed or embed code).

I think it’s handy and I keep having to go to codepen to find it. So now it’s here.

See the Pen
full size youtube/vimeo
by Tom (@twwoodward)
on CodePen.