cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-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.

            
              <ul>
  <li>One</li>
  <li>Two</li>
  <li>Three</li>
  <li>Four</li>
  <li>Five</li>
  <li>Six</li>
  <li>Seven</li>
  <li>Eight</li>
  <li>Nine</li>
  <li>Ten</li>
  <li>Eleven</li>
  <li>Twelve</li>
  <li>Thirteen</li>
</ul>
            
          
!
            
              // Now let's think about the items.
// Write code to target items. Place the black boxes in the first column, and place the blue boxes  in the second column. Do so in such a way that we can see all of the boxes (none are hidden behind another).

ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  grid-gap: 1rem;
}






//--------------------------------------
// Additional Visual Styling
body {
  background: #F6F3EA
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: white;
  font-family: Avenir, Heveltica, Arial, san-serif;
  font-weight: bold;
  font-size: 1.5rem;
}
li {
  padding: 1em;
  background: #F9423A;
}
li:nth-child(2),
li:nth-child(6){
  background: #444;
}
li:nth-child(8),
li:nth-child(10){
  background: #4794B8;
}
            
          
!
            
              /* Stuck?
   Scroll down for a clue (not the full answer):

    ||
    ||
    ||
    \/

























// This might help:

li:nth-child(2) {

}
li:nth-child(6) {

}
li:nth-child(8) {

}
li:nth-child(10) {

}


// Still Stuck?
   Scroll down for a second clue:

    ||
    ||
    ||
    \/










li:nth-child(2) {
  grid-row: 1 / 2;
  grid-column: 1 / 2;
}



// Want to see one possible answer? Scroll down:

    ||
    ||
    ||
    \/










li:nth-child(2) {
  grid-row: 1 / 2;
  grid-column: 1 / 2;
}
li:nth-child(6) {
  grid-row: 2 / 3;
  grid-column: 1 / 2;
}
li:nth-child(8) {
  grid-row: 1 / 2;
  grid-column: 2 / 3;
}
li:nth-child(10) {
  grid-row: 2 / 3;
  grid-column: 2 / 3;
}


*/
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

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

Console