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

              
                <link href="https://fonts.googleapis.com/css?family=Lora:400,400i,700" rel="stylesheet">

<main class="Prose">
<h1>Using CSS Grid<br>
  <small>to make breakout elements</small>
  </h1>
  
  <p><em style="font-size:110%;">This layout uses CSS Grid to make <a href="https://cloudfour.com/thinks/breaking-out-with-css-grid-layout/">full-width elements</a> without using max-width on paragraphs, negative margins, or other common hacks.</em></p>

  <blockquote class="Prose-splash"><inner><q>When words become unclear, I shall focus with photographs. When images become inadequate, I shall be content with silence.</q>
    <cite>— Ansel Adams</cite></inner></blockquote>


  
<p>Great photos have power.</p>

  
<p>Photo can boost sales, gather interest and tell stories.  Your Images can tell your viewers what your website is about before they’ve read a single sentence. Great product photos do more to sell merchandise than pages of text ever could.</p>

  <figure class="Prose-splash">
  <img src="http://www.launch2success.com/wp-content/uploads/2017/02/photography.jpg" />
    <figcaption> <i>Ah, the power of a giant lens.</i> </figcaption>
  </figure>
  
<p>But you probably already know that.</p>

<p>What you probably don’t know, is how to properly use images to make your website more effective.  Know that such a thing is possible, and actually executing it are two separate things.</p>

<p>In this article, I’m going to show you how to get great photos, edit them, and make them work for you!</p>
  
 <p> <a href="http://www.launch2success.com/guide/website-photography-guide-2017/">Read Full Article...</a></p>
   <blockquote class="Prose-splash">
    <inner>
      <p>This is my own implementation of a concept  from  <a href="https://cloudfour.com/thinks/breaking-out-with-css-grid-layout/">Tyler Sticka</a>.</p>
    <p>I really like this concept, as it pulls off this layout without the usual hackery like crazy max-widths, negative margins, etc.</p>
      <p>However, it's not quite ready for production sites yet as it doesn't currently work in browsers that don't support CSS grid.</p>
    </inner>
  </blockquote>
  
</main>


              
            
!

CSS

              
                body {
   margin:0;
  font-family: 'Lora', serif;
  line-height:1.35;
  background:#f2f6f8;
}

.Prose, blockquote {
  display: grid;
  grid-template-columns: 
    [full-start] minmax(1em, 1fr) 
    [main-start] minmax(0, 36em) [main-end]
    minmax(1em, 1fr) [full-end];
  
  max-width:1300px;
  margin:auto;
  box-shadow: 0 0 12px rgba(0,0,0,.25);
  background:white;
}

.Prose > * {
  grid-column: main;
}

.Prose-splash {
  grid-column: full;
}

blockquote {
  background:#234; color:white; 
  padding:2em; margin:0; 
  line-height:1.35;
}
blockquote inner {
  display:block;
  grid-column: main;
  margin:auto;
  font-size:1.15em;
}
blockquote cite {
  display:block; text-align:right;
  margin:.4em 0;
}
blockquote a {color:#def;}

figure {
  background:#234;
  color:white;
  margin:0; padding:0;
  text-align:center;
}
figcaption {padding:.8em;}
a {color:#27b;}
img {max-width:100%; vertical-align:top;}
p {line-height:1.55; margin:0 0 1.4em;}
* + p {margin-top:1.4em;}
p + p {margin-top:0em;}
h1 {font-size:4.88em; line-height:0.95; margin:.35em 0; margin-right:-8px;  }
h1 small {font-size:56.5%; line-height:1;  }

@media (min-width:900px) {
  body { font-size:115%;}  
}

@media (min-width:1400px) {
  body { font-size:130%;}  
}
              
            
!

JS

              
                
              
            
!
999px

Console