Hi.
I just wanted to put here a nifty thing I ran across today when a request came in to embed a youtube video responsively.
In the past I’ve tried other solutions that have worked as well, but I want to say kudos to the person/people behind this: http://embedresponsively.com/. It’s very helpful of them to provide a help like this.
Basically, after looking at their generated snippet, I removed the width and height from the youtube video (not sure yet if this affects ie8 or anything so still need to check that), added a wrapper with a class of .embed-container, and this this css to the stylesheet:
.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
Very helpful,
-R