Embedded content shrinks to 150px height when resized
-
I’m using the less framework and media queries to modify my css based on browser width. (I’m using the four default width sizes of full browser, tablet, wide mobile, and mobile.) Everything is working perfectly except for embedded content.
At the widest size, all of my iframes/javascript embeds (such as YouTube embeds and Wufoo forms) look perfect. Initially, these embeds stayed their full width even when the rest of the page shrunk, so I set the width to 100% of the div with
iframe { width: 100%; height: auto; }
This makes the width work right for all my embeds, but the height, instead of adjusting correctly, goes to 150px, no matter what. So at my tablet width, my YouTube video is 416 x 150, and then at the mobile width it’s 252 x 150, etc. With YouTube, the video shrinks to fit in the box with black background on the sides; with form content it just hides the overflow.
No matter what I try, I can’t set the height to automatically fix itself. What am I doing wrong?
(This is true in both Firefox and Chrome. IE8 doesn’t support the media queries anyway.)
- The topic ‘Embedded content shrinks to 150px height when resized’ is closed to new replies.