cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


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.

              <div class="wrapper">
  <div class="box a">
    <p>This is box A. </p>
  <div class="box b">
    <p>This is box B.</p>
  <div class="box c">
    <p>This is box C.</p>

  <div class="box d">
    <p>This is box D.</p>
  <div class="box e">
    <p>Each of the boxes on the left has a grid area of 3 columns and 3 rows (we're counting the gutter col/row). </p>
    <p>The align-items property is used to align the content inside each grid-area.</p>
    <p>Other values of align-items are:</p>
              body {
  margin: 40px;
  font: 80% Arial, Helvetica, sans-serif;
.wrapper {
  display: grid;
  align-items: center;
  background: no-repeat url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/grid.png);
  grid-gap: 10px;
  grid-template-columns:  repeat(6, 150px);
  grid-template-rows: repeat( 4, 150px);
  background-color: #fff;
  color: #444;

.box {
  border: 1px solid #444;
  padding: 20px;
  font-size: 150%;

.a {
  grid-column: 1 / 3;
  grid-row: 1 / 3;

.b {
  grid-column: 3 / 5;
  grid-row: 1 / 3;

.c {
  grid-column: 1 / 3;
  grid-row: 3 /  6;

.d {
  grid-column: 3 / 5;
  grid-row: 3 / 6;

.e {
  grid-column: 5 / 7;
  grid-row: 1 / 6;
  align-self: stretch;

Loading ..................