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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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="navigation">
  Navigation
</div>

<div class="blue-box">
 Blue box
</div>

<div class="left-column">
  <div class="dark-grey-text">
  Dark grey text: Fusce tincidunt, libero at luctus malesuada, lorem odio pellentesque justo, quis vulputate sem arcu sit amet orci. Nulla mollis mattis urna, ut molestie tellus viverra eu. Vivamus sed ullamcorper justo. Vivamus bibendum sapien in leo malesuada pulvinar. Quisque iaculis aliquam ornare. In ante erat, elementum sed est sed, sollicitudin tincidunt mauris. Nulla at porttitor lorem. Quisque magna tortor, sollicitudin ut convallis quis, faucibus vitae diam. In vitae leo risus. Nulla nec eros id quam malesuada pharetra.
  </div>
  <div class="grey-text">
  Grey text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sed nulla ultricies, cursus est ut, facilisis felis. Maecenas sit amet porttitor ipsum, vitae viverra augue. Nunc condimentum lobortis purus, non facilisis magna facilisis sit amet. Mauris gravida ultrices arcu, non vestibulum nisi eleifend eu. Donec eleifend risus turpis, eu vehicula velit iaculis nec. Proin mollis, erat ac pellentesque viverra, lacus lectus faucibus sem, vitae vestibulum turpis nunc et metus. Sed consectetur tellus viverra, feugiat magna nec, commodo metus.
  </div>
</div>

<div class="pink-green-wrapper">
<div class="green-box">
  Green box
</div>

<div class="pink-box">
  Pink box
</div>
</div>

<div class="footer">
  Footer
</div>
              
            
!

CSS

              
                .navigation {
  clear: both;
  height: 50px;
  margin-bottom: 20px;
  background-color: black;
  color: white;
}

.blue-box {
  float: right;
  width: 20%;
  height: 150px;
  margin-bottom: 20px;
  background-color: blue;
}

.left-column {
  float: left;
  width: 75%;
}
.dark-grey-text {
  
}

.grey-text {
  margin-top: 20px;
  margin-bottom: 20px;
  color: grey;
}

.pink-green-wrapper {
  width: 20%;
  float:right;
  clear: right;
  margin-bottom: 20px;
}

.pink-box {
  float: left;
  width: 50%;
  height: 150px;
  background-color: pink;
}

.green-box {
  float: left;
  width: 50%;
  height: 150px;
  background-color: green;
}



.footer {
  clear: both;
  height: 50px;
  background-color: black;
  color: white;
}

@media all and (max-width: 480px)  {
		.blue-box {
		  float: none;
			width: 100%;
		}
    .left-column {
      width: 100%;
      float: none;
    }
          .pink-green-wrapper {
            float: none;
            width: 100%;
          }
    .pink-box, .green-box {
      float: left;
      width: 50%;
      margin-bottom: 20px;
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console