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 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

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="container">
  <div class="half">
    <div class="box box1"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quis quidem inventore rerum ipsa, enim asperiores possimus cum dolores animi iste quaerat minus excepturi blanditiis, eum esse aut dolore. Hic, incidunt.</p></div>
  </div>
  <div class="half right">
    <div class="box box2"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p></div>
    <div class="box box3"><p>Lorem ipsum dolor sit amet.</p></div>
    <div class="box box4"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p></div>
    <div class="box box5"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p></div>
    <div class="box box6"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p></div>
    <div class="box box7"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p></div>
</div>

              
            
!

CSS

              
                *
  margin: 0
  padding: 0
  box-sizing: border-box
.container 
  width: 100%
  .half 
    width: 50%
    float: left
    position: relative
    .box
      border: 2px solid black
      position: relative
      text-align: center
      padding: 1em
      overflow: hidden
      p
        position: absolute
        top: 50%
        left: 0
        right: 0
        transform: translateY(-50%)
        color: white
    .box1 
      width: 100%
      height: 100vh
      background: black
  .right
    display: flex
    flex-wrap: wrap
    height: 100vh
    .box
      height: 33.33%
    .box2
      width: 66.66%
      background: blue
    .box3
      width: 33.33%
      background: red
    .box4
      width: 100%
      background: orange
    .box5
      width: 33.33%
      background: purple
    .box6
      width: 33.33%
      background: green
    .box7
      width: 33.33%
      background: brown
              
            
!

JS

              
                
              
            
!
999px

Console