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.

              //  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;


  grid-column: span 3;
li:nth-child(8) {
  grid-row: span 5;
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.

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