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

              
                <div class="wrapper">
  <div class="box a">A</div>
  <div class="box b">B</div>
  <div class="box c">C</div>
  <div class="box d">D</div>
  <div class="box e">E</div>
  <div class="box f">F</div>
  <div class="box g">G</div>
  <div class="box i">I</div>
</div>
              
            
!

CSS

              
                body {
    margin: 40px;
  }
  
  .wrapper {
    display: grid;
    grid-template-columns: 100px 100px 100px;
    grid-gap: 10px;
    background-color: white;
    color: rgb(71, 13, 13);
  }
  
/* Grid option 1: Just leave the box properties as they are and based on grid-template-columns, you'll have different arrangements display */
/* No need to comment this out */

  .box {
    background-color: rgb(71, 13, 13);
    color: white;
    border-radius: 5px;
    padding: 20px;
    font-size: 150%;
  }

/* Grid option 2: Uncomment lines 26-61 */

/* .a {
    grid-column-start: 2;
    grid-column-end: 3;
    grid-row-start: 1;
    grid-row-end: 2;
}
.b {
    grid-column-start: 2;
    grid-column-end: 3;
    grid-row-start: 2;
    grid-row-end: 3;
}
.c {
    grid-column-start: 3;
    grid-column-end: 4;
    grid-row-start: 2;
    grid-row-end: 3;
}
.d {
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row-start: 1;
    grid-row-end: 2;
}
.e {
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row-start: 2;
    grid-row-end: 3;
}
.f {
    grid-column-start: 3;
    grid-column-end: 4;
    grid-row-start: 1;
    grid-row-end: 2;
} */

/* Grid option 3 for multi-space boxes... stretch them out! Comment out previous section and uncomment lines 65-80. Feel free to change numbers and see what your webpage does. Keep in mind that comments inside the code will not make it easy to simply comment and uncomment the whole section - might not work right away, just read the whole piece of code and make sure the inline comments don't mess it up. */

/* .a {
    grid-column: 1 / 3; /* Goes from column one until the left edge of column 3 
    grid-row: 1;
  }
  .b {
    grid-column: 3 ;
    grid-row: 1 / 4; /* Goes from row one to the top of row 4 
  }
  .c {
    grid-column: 1 ;
    grid-row: 2 ;
  }
  .d {
    grid-column: 2;
    grid-row: 2;
  } */
              
            
!

JS

              
                
              
            
!
999px

Console