Created
          June 26, 2014 17:35 
        
      - 
      
- 
        Save SiGaCode/79c90ecd07b489044eb4 to your computer and use it in GitHub Desktop. 
    Responsive iframes and maps with just CSS
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* Responsive iFrame */ | |
| .responsive-iframe-container { | |
| position: relative; | |
| padding-bottom: 56.25%; | |
| padding-top: 30px; | |
| height: 0; | |
| overflow: hidden; | |
| } | |
| .responsive-iframe-container iframe, | |
| .vresponsive-iframe-container object, | |
| .vresponsive-iframe-container embed { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| } | |
| /*And then wrap your Google Map or Google Calendar iframe in a div like this:*/ | |
| /*<div class="responsive-iframe-container"> | |
| <... iframe code > | |
| </div>*/ | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment