Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

Save Automatically?

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="wrapper">
  <div>Hi, I'm 30% of the viewport. 
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem, minus?</div>
  <div>You know what? Ima take 50% of the viewport.</div>
  <div>Ima div inside a <code>.wrapper</code>. The <code>.wrapper</code> is a CSS grid layout. How? We did <code>display: grid</code> on it. 
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem quo tempore quia autem. Eaque, ullam?</div>
  <div>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vel dolore commodi eius unde cupiditate sint mollitia adipisci fugiat incidunt dolorem officiis cumque repellat ducimus doloribus ex laborum veritatis, temporibus, vitae alias? Sint excepturi laboriosam, quo ipsa ratione laudantium consequuntur saepe consequatur placeat voluptatibus maxime hic necessitatibus accusamus enim. Explicabo, molestias!</div>
  <div>Just fancy layout with <strong>2 lines of CSS</strong>: <br/> 
  <pre><code>
  display: gird;
  grid-template-columns: 30% 50% 20%;
  </code></pre>
    
    </div>
  <div>Hello! No clearfixes, no floats. </div>
</div>
              
            
!

CSS

              
                .wrapper {
  display: grid; // Hey, this is a grid
  grid-template-columns: 30% 50% 20%; // Gimme 3 columns with these sizes pronto!
  
  div {
    background: gainsboro;
    padding: 1em;
  }
  
  div:nth-child(odd) {
    background: silver;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console