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. 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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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="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>
              
            
!

CSS

              
                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%);
}

              
            
!

JS

              
                
              
            
!
999px

Console