cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

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.

            
              div.notice
  p Sorry! A browser with GRID #[a( href='http://caniuse.com/#feat=css-grid' ) support] is required to view this pen.

div.grid.debug
  header.main-header header
  div.cell.cell--fig1 fig1
  div.cell 1
  div.cell 2
  div.cell.cell--fig2 fig2
  div.cell 3
            
          
!
            
              *
  box-sizing: border-box
  
html,
body
  background-color: #ebe9ea
  width: 100%
  min-height: 100%
  margin: 0
  padding: 0

body
  font-family: 'Philosopher', sans-serif
  color: #333

@supports (display: grid)
  .notice
    display: none
  
.notice
  width: 100%
  background-color: #333
  color: #fff
  padding: 1rem
  text-align: center
  font-family: 'Roboto', sans-serif
  font-weight: 700
  letter-spacing: 1px
  text-transform: uppercase
  a
    color: #fff
    text-decoration: none
    border-bottom: 1px solid white  
  
.grid
  min-height: 100vh

@media (min-width: 640px)
  .grid
    display: grid
    grid-gap: 20px
    grid-template-rows: 60px auto auto auto
    grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr) minmax(300px, 1fr)

  .main-header
    grid-column: 1 / span 3
  
  .cell--fig1
    grid-column: 1 / span 3
  
  .cell--fig2
    grid-column: 1 / span 3

  .cell:nth-of-type(2)
    grid-column: 1 / span 1
    
  .cell:nth-of-type(3)
    grid-column: 2 / span 1
    
  .cell:nth-of-type(5)
    grid-column: 1 / span 2

@media (min-width: 980px)
  .grid
    grid-template-rows: 60px auto auto
    grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr) minmax(300px, 1fr) minmax(300px, 1fr)
    
  .main-header
    grid-column: 1 / span 4
  
  .cell--fig1
    grid-row: 2
    grid-column: 1 / span 2
  
  .cell:nth-of-type(2)
    grid-column: 1 / span 1
    grid-row: 3
    
  .cell:nth-of-type(3)
    grid-column: 3
    grid-row: 2
 
  .cell:nth-of-type(5)
    grid-row: 2 / span 2
    grid-column: 4
  
  .cell--fig2
    grid-column: 2 / span 2
    grid-row: 3
    
.debug
  .main-header,
  .cell
    background-color: alpha(purple, 0.1)
    border: 1px solid alpha(purple, 0.2)
    font-size: 2.5rem
    font-family: Arial
    font-weight: bold
    color: alpha(purple, 0.2)
    padding: 10px
    line-height: 1    
  
  .cell
    min-height: 300px
    min-width: 300px

            
          
!
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