Pen Settings



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


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


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.


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.


                <div class="content-wrapper">
    <div class="header-left">Header left</div>
    <div class="header-right">Header right</div>
    <div class="main-content">Main content</div>
    <div class="footer">
      <div class="footer-content">Footer content</div>



                .content-wrapper { background-color: #f0f0f0; }
.header-left { background-color: #ff0; }
.header-right { background-color: #f0f;}
.main-content { background-color: #0ff; }
.footer { background-color: #ccc; }
.footer-content { background-color: #f99; }

.header-left { grid-area: header-left; }
.header-right { grid-area: header-right; }
.main-content { grid-area: main-content; }
.footer { grid-area: footer; }

.content-wrapper {
  display: grid;
  height: 300px;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: min-content auto min-content;
    "header-left header-right"
    "main-content main-content"
    "footer footer"

@media all and (min-width: 800px) {
  .content-wrapper {
    grid-template-columns: 1fr 2fr 2fr 1fr;
      "header-left header-left header-right header-right"
      ". main-content main-content ."
      "footer footer footer footer"
  .footer-content {
    margin-left: auto;
    margin-right: auto;
    width: 66.67%; /* Combined width of the two middle columns */

@media all and (min-width: 1200px) {
  .content-wrapper {
    grid-template-columns: auto 200px 400px 400px 200px auto;
      ". header-left main-content main-content header-right ."
      ". . main-content main-content . ."
      "footer footer footer footer footer footer"
  .footer-content {
    width: 800px; /* Combined width of the two middle columns */