Skip to content

Conversation

@magnificode
Copy link

Add CSS that make iframes responsive, and helps them to scale while preserving aspect ratio. In addition a maximum width is applied to the iframe to prevent it from spanning the full width of the browser at large screen sizes.

@johnnywon
Copy link

On line 148:
position: relative
is causing the new YouTube chromeless player to malfunction. Deleting line 148 allows the user to hover over the iframe embed video and play it.

http://jsfiddle.net/ru2o01n3/2/

@robneu
Copy link

robneu commented Sep 9, 2015

FWIW, it looks like both of those implementations are broken on the latest version of Firefox.

jsfiddle net_2015-09-08_23-39-12

Wouldn't this be something that's better handled by another script like FitVids or FluidVids?

@johnnywon
Copy link

I tested in Chrome and Safari, ugh I really like fitvids.js, wish I knew about that before.

@Paskalouis
Copy link

Any updates regarding this ?
Just used this iframe then stumbled upon responsive things.
Currently I add maxWidth 100% for quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants