I present to you The Incredible Singing Cat solution =)
.wrapper { position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 25px; height: 0; } .wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
jsFiddle: http://jsfiddle.net/omarjuvera/8zkunqxy/2/
As you move the window bar, you’ll see iframe to responsively resize
Alternatively, you may also use the intrinsic ratio technique
- This is just an alternate option of the same solution above (tomato, tomato)
.iframe-container { overflow: hidden; padding-top: 56.25%; /* 16:9 */ position: relative; } .iframe-container iframe { position: absolute; top: 0; left: 0; border: 0; width: 100%; height: 100%; }
Related Posts:
- Responsive iframe with max width and height
- What is the difference among col-lg-*, col-md-* and col-sm-* in Bootstrap?
- Responsive Bootstrap Jumbotron Background Image
- margin-right is not working with my HTML. How can I center my content?
- Iframe’s overflow problem
- In a bootstrap responsive page how to center a div
- How can I make my header image properly responsive?
- How to get multiple images to auto resize and stay centered within a div
- How to make canvas responsive
- How to Add Custom CSS to the Media Thickbox?
- Set 3 iframes in a row
- How to display javascript banner in website header?
- Chrome give error **Failed to load resource: net::ERR_NAME_NOT_RESOLVED** while other browser load images
- How to change text transparency in HTML/CSS?
- How to apply CSS to iframe?
- How do I rotate text in css?
- CSS float left not working right
- What does “*” mean in CSS?
- How do you add a scroll bar to a div?
- Delete white space between divs
- Reset/remove CSS styles for element only
- Add a link to an image in a css style sheet
- SSL Breaks WordPress CSS
- show classes as dropdown in guttenberg`s additional css classes input box
- Use a higher than 230px logo image with 2013 theme
- How can I insert HTML attributes with an existing TinyMCE button?
- Hiding certain panels in dashboard
- customizing recent posts
- Why is WordPress changing my HTML code
- Best way to install Bulma (CSS Framework) with WordPress and Genesis
- Looking for methods to Check if File Exist
- How to change the style.css?ver=5.4.1 in WordPress?
- why enqueued styles in header.php shows in footer?
- Different css rules for TinyMCE and Gutenberg while using add_editor_style()
- Add fields in customization tab to change background colours of certain classes
- Responsive Author Style in BBpress?
- Get a blank line after div by simply leaving an empty line in the editor
- Archive pages have smaller font then the rest of my website [closed]
- How to stop my themes CSS changing the WordPress interface/?
- CSS not applying in admin
- loading a custom stylesheet in a function
- Keeping CSS model open after form submission
- Sidebar button click redirect when user is not logged in instead displays it
- How do I use inline styling with WordPress?
- WordPress address URL and bloginfo
- Add class to navigation link of page
- My CSS suddenly doesn’t load anymore [closed]
- Is there a way to add new div class via a theme’s Additional CSS interface?
- Keep comments but turn off commenting
- How can I move my custom css to the very bottom of the head section?
- Wrong image path within inline styles in the head
- Long post titles don’t move to next line
- How to not load stylesheet and how to load a second stylesheet on a page
- WordPress Caption Formatting
- Change the search icon in twenty fourteen
- Plugins not showing up for custom template
- Using True Type Fonts (ttf) [closed]
- Horizontal drop down category with hover effect working
- The Global Styles missing
- Invert porfolio item order
- WordPress Sudden Loss of All CSS And Tons of JQuery Errors
- Can’t find a tag to style
- How to show address in one row?
- Custom CSS on mobile
- Removing Image Links from Custom Post Type
- Add inline CSS to login page with wp_add_inline_style
- Set version number in child’s style.css file
- Cannot add a class to metabox
- I want to transfer my additional css code to my theme file–?
- WordPress changing content:”” to content: "
- How to customize Metaboxes?
- Change image using only CSS [closed]
- theme RTL make big white space in mobile mode and you need to scroll to see the site
- Why child theme stylesheet takes long time to update?
- Logo Keeps Changing to the Default for Transparent Settings
- Content going full width even though container is not
- I want to change change the arrangement of the grid of posts displayed by the theme on the Search page (read the description for better understanding)
- Align divs in a basic WordPress site
- Can’t center post thumbnail with bootstrap [closed]
- Force include a stylesheet from parent theme
- How can I override an existing custom CSS rule for a specific page
- How can I add this specific link hover effect to a WP site? [closed]
- HTML5/CSS3 Polyfill for wp-login.php
- Bizarre WordPress CSS update problem
- Site name not showing in browser bar, only url
- Making a custom CSS per mobile
- Style tag on wp_footer
- Display current category without an active link in wp_list_categories
- Outputting the blogposts or the_content()
- WordPress with PageLines theme: how to change the background color of a page? [duplicate]
- Apply Classes to post text inside editor
- Twenty Twelve theme: remove margins
- Parent style messing up with Bootstrap [closed]
- s2member captcha how to make responsive – css or javascript
- How to define a special character to change the style of my inline code?
- Why is the “Additional CSS” section missing in my theme Customizer?
- Is there a way to edit the fonts of headings without a plugin (in the 2022 theme)?
- How enqueue CSS out of theme folder?
- Styling not refreshing for old visitors on WordPress
- What is unsafe about this CSS?