Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add responsive styling for iframes #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add responsive styling for iframes #115

wants to merge 1 commit into from

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.

None yet

5 participants