Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="thumbnail"> 
<a href="http://www.foxnews.com">Fox News </a>
<iframe src="http://www.foxnews.com"></iframe>
</div> 

<div class="thumbnail"> 
<a href="http://www.msnbc.com">MSNBC </a>
<iframe src="http://www.msnbc.com"></iframe>
</div> 


<div class="thumbnail"> 
<a href="http://www.huffingtonpost.com">HUFFPO </a>
<iframe src="http://www.huffingtonpost.com"></iframe>
</div> 

              
            
!

CSS

              
                
/* a note re: height and width.  Start off by adding to .thumbnail {} the final width and height
   you want to see in the final product.  Aspect ratio is totally up to you.
   Then pick the size of iframe you want to minimize.  If you want to see the page as if it were a  
   mini desktop, you'll want desktop dimensions.  If you want to see the sites as they would 
   appear on a phone, you'll want some smaller width.  It's up to you.  I've gone with a 
   mini-desktop, picking a smallish desktop resolution (1000px wide).  Add these height and
   width values to .thumbnail iframe {}.  
   The aspect ratio (w/h) should match for both sets!  If you pick 4:3 for .thumbnail, the 
   math has to match for .thumbnail iframe, at least if you want only one scale value to use
   across the board.
   Finally, divide the smaller .thumbnail height (or width) by the iframe height (or width) and 
   *THAT* will be your scale value, which will be added in your transform scales in this file and 
   in ie-only.css.  */


.thumbnail { /* the width and height here are your resultant sizes. */
    width: 400px;
    height: 300px;
    float:left;
    margin:20px;
    position: relative;
}
 
.thumbnail iframe {  /* the width and height here are your "unshrunken" sizes.  Important bc of the scale variable later. */
    position: relative;
    z-index: 1;
    width: 1000px;   
    height: 750px;
 
    -webkit-transform-origin: 0 0;
    -moz-transform-origin: 0 0;
    transform-origin: 0 0;

 
    -webkit-transform:  scale(0.4, 0.4);   /* Gets the size down to fit into your .thumbnail. */
    -moz-transform:  scale(0.4, 0.4);      /* Gets the size down to fit into your .thumbnail. */
    transform:  scale(0.4, 0.4);           /* Gets the size down to fit into your .thumbnail. */
    overflow: hidden;

}

.thumbnail a {
    position: absolute;
    top: 300px;
}

              
            
!

JS

              
                
              
            
!
999px

Console