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><img src="http://labs.jensimmons.com/2017/media/01-001/brooklynmuseum-o1085i000-52.166.5.jpg" alt=""></li>
  <li><img src="http://labs.jensimmons.com/2017/media/01-001/380485.jpg" alt=""></li>
  <li><img src="http://labs.jensimmons.com/2017/media/01-001/brooklynmuseum-o4266i000-86.226.18_SL1.jpg" alt=""></li>
  <li><img src="http://labs.jensimmons.com/2017/media/01-001/brooklynmuseum-o44489i000-35.867_reference_SL1.jpg" alt=""></li>
  <li><img src="http://labs.jensimmons.com/2017/media/01-001/436667.jpg" alt=""></li>
</ul>
            
          
!
            
              // Now make many of these paintings overlap. Make them span multiple cells.
// If you'd like, make more columns. Feel free to place things in column 6 or 7 or more, even without defining more columns explictly. See what happens? The browser makes more grid for you.

ul {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  grid-auto-rows: 1fr;
  grid-gap: 1rem;
}
li:nth-child(1) {
  grid-row: 1 / 2;
  grid-column: 1 / 2;
}
li:nth-child(2) {
  grid-row: 2 / 3;
  grid-column: 3 / 4;
}
li:nth-child(3) {
  grid-row: 1 / 2;
  grid-column: 4 / 5;
}
li:nth-child(4) {
  grid-row: 3 / 4;
  grid-column: 2 / 3;
}
li:nth-child(5) {
  grid-row: 3 / 4;
  grid-column: 4 / 5;
}



//--------------------------------------
// Additional Visual Styling
* {box-sizing:border-box;}
body {
 background: #f6f3ea;
}
img {
  display: block;
  width: 100%;
}
ul {
  list-style: none;
  margin: 0;
  padding: 2.2rem;
}
            
          
!
            
              /* Stuck?
   Scroll down for one of a zillion possible answers:

    ||
    ||
    ||
    \/
























This is not very pretty, but it does the job. 

ul {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  grid-auto-rows: 1fr;
  grid-gap: 1rem;
}
li:nth-child(1) {
  grid-row: 1 / 3;
  grid-column: 1 / 3;
}
li:nth-child(2) {
  grid-row: 2 / 5;
  grid-column: 2 / 5;
}
li:nth-child(3) {
  grid-row: 1 / 3;
  grid-column: 4 / 6;
}
li:nth-child(4) {
  grid-row: 3 / 5;
  grid-column: 1 / 3;
}
li:nth-child(5) {
  grid-row: 4 / 7;
  grid-column: 3 / 6;
}
li {
 opacity: 0.75;
}


*/
            
          
!
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