Found 2 bookmarks
Custom sorting
Responsive iframes with the CSS aspect-ratio property
Responsive iframes with the CSS aspect-ratio property
Today, I want to show you can use a few lines of CSS to make your embedded iframes fully responsive. Let’s dig in! The challenge with iframes and responsive layouts Unlike images and the native HTML5 video element, iframes do not scale responsively by default. /** * This does NOT work */ iframe { max-width: 100%; height: auto; } Years back, Dave Rupert put together a great video showing the challenge with responsive iframe videos.
·gomakethings.com·
Responsive iframes with the CSS aspect-ratio property