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

Quick-add: + add another resource

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.

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>
            
          
!
            
              //  Play around with what happens if you toggle the layout between sparse and dense.

ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px,1fr));
  grid-auto-rows: 1fr;
  grid-gap: 1rem;
// grid-auto-flow: dense;

}

li:nth-child(4),
li:nth-child(5),
li:nth-child(10){
  grid-column: span 3;
}
li:nth-child(7),
li:nth-child(8) {
  grid-row: span 5;
}
li:nth-child(1),
li:nth-child(6),
li:nth-child(9) {
  grid-row: span 3;
  grid-column: span 2;
}






//--------------------------------------
// 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.2rem;
}
li {
  padding: 1em;
  background: #F9423A;
}

            
          
!
            
              /* 

See what happens when you add:

ul {
  grid-auto-flow: dense;
}

You can simply uncomment the CSS on line 8. Try it at different  viewport widths, or by changing the size of your boxes, the size of your track sizes, and the size of your gap.

*/
            
          
!
999px
Loading ..................

Console