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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="grid-container">
  <div class="sidebar">
    <h2>Sidebar Heading</h2>
  </div>
  <div class="one">
    <div class="circle">
    </div>
  </div>
  <div class="two">
    <img src="https://i.imgur.com/66G1azk.jpg">
  </div>
  <div class="three">
    <div class="circle">
    </div>
  </div>
  <div class="four"><img src="https://i.imgur.com/66G1azk.jpg" /></div>
  <div class="five">
    <div class="circle">
    </div>
  </div>
  <div class="six"><img src="https://i.imgur.com/66G1azk.jpg" /></div>
  <div class="seven"><img src="https://i.imgur.com/66G1azk.jpg" /></div>
  <div class="eight">
    <div class="circle">
    </div>
  </div>
  <div class="nine"><div class="circle">
    </div></div>
  <div class="ten">
    <div class="circle">
    </div>
  </div>
  <div class="eleven">
    <div class="circle">
    </div>
  </div>
  <div class="twelve">
     <div class="circle">
    </div>
  </div>
</div>
            
          
!
            
              html,
body {
  max-width: 2000px;
  margin: 0 auto;
}

.grid-container {
  height: 100%;
  margin: 0;
}

.grid-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-container * {
/*    border: 1px solid red; */
  position: relative;
}

.grid-container {
  display: grid;
  grid-template-columns: auto 400px auto;
  grid-template-rows: 5fr repeat(12, 1fr);
  grid-template-areas:
    "sidebar sidebar sidebar"
    ".       one     ."
    "two     two     two"
    ".       three   ."
    "four    four    four"
    ".       five    ."
    "six     six     six"
    "seven   seven   seven"
    ".       eight   ."
    ".       nine    ."
    ".       ten     ."
    ".       eleven  ."
    ".       twelve  .";
}

@media (min-width: 560px) {
  .grid-container {
    grid-template-columns: auto 400px;
    grid-template-rows: repeat(12, 1fr);
    grid-template-areas: 
      "sidebar one"
      "sidebar three"
      "sidebar five"
      "sidebar eight"
      "sidebar nine"
      "sidebar ten"
      "sidebar eleven"
      "sidebar twelve"
      "two     two"
      "four    four"
      "six     six"
      "seven   seven";
  }
}
@media (min-width: 960px) {
  .grid-container {
    grid-template-columns: auto repeat(2, 400px);
    grid-template-rows: repeat(8, 1fr);
    grid-template-areas:
      "sidebar one    three"
      "sidebar five   eight"
      "sidebar two    two"
      "sidebar nine   ten"
      "sidebar eleven twelve"
      "four    four   four"
      "six     six    six"
      "seven   seven  seven";
  }
}
@media (min-width: 1180px) {
  .grid-container {
    grid-template-columns: auto 400px auto 400px;
    grid-template-rows: repeat(6, 1fr);
    grid-template-areas:
      "sidebar one    two   two"
      "sidebar four   four  three"
      "sidebar five   six   six"
      "sidebar seven  seven eight"
      "sidebar nine   .     ten"
      "sidebar eleven .     twelve";
  }
}
@media (min-width: 1600px) {
  .grid-container {
    grid-template-columns: auto repeat(4, 400px) auto;
    grid-template-areas:
      ". sidebar one    two    two"
      ". sidebar four   four   three"
      ". sidebar five   six    six"
      ". sidebar seven  seven  eight"
      ". sidebar nine   .      ten"
      ". eleven  .      twelve .";
  }
}
@media (min-width: 2000px) {
  .grid-container {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    grid-template-areas:
      "sidebar one   two   two    two"
      "sidebar four  four  four   three"
      "sidebar five  six   six    six"
      "sidebar seven seven seven  eight"
      "sidebar ten   nine  eleven twelve";
  }
}

.sidebar {
  grid-area: sidebar;
  padding: 20px;
}

.one {
  grid-area: one;
}

.two {
  grid-area: two;
}

.three {
  grid-area: three;
}

.four {
  grid-area: four;
}

.five {
  grid-area: five;
}

.six {
  grid-area: six;
}

.seven {
  grid-area: seven;
}

.eight {
  grid-area: eight;
}

.nine {
  grid-area: nine;
}

.ten {
  grid-area: ten;
}

.eleven {
  grid-area: eleven;
}

.twelve {
  grid-area: twelve;
}

.one,
.two,
.three,
.four,
.five,
.six,
.seven,
.eight,
.nine,
.ten,
.eleven,
.twelve {
  height: 400px;
  min-width: 400px;
}

.circle {
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background-color: grey;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console