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.

            
              <p>Key</p>
<ul class="no-bullet">
  <li><span class="box blue"></span> Content area</li>
  <li><span class="box gray"></span> Gutter (padding)</li>
  <li><span class="box black"></span> Column (demo border)</li>
</ul>

<p>You can remove the column gutters within a row by adding the <code>.collapse</code> class.</p>

<div class="row collapse">
  <div class="small-2 large-4 columns"><span>CONTENT</span></div>
  <div class="small-4 large-4 columns"><span>CONTENT</span></div>
  <div class="small-6 large-4 columns"><span>CONTENT</span></div>
</div>

<p>This class has responsive modifiers so you can remove the column gutters based on screen size too. Wins!</p>

<div class="row small-uncollapse medium-collapse large-uncollapse">
  <div class="large-3 columns"><span>CONTENT</span></div>
  <div class="large-6 columns"><span>CONTENT</span></div>
  <div class="large-3 columns"><span>CONTENT</span></div>
</div>

<p>The above example has collapsed column gutters on the medium breakpoint only.</p>

<p>You can also collapse the gutters on a block grid.</p>

<div class="row small-up-2 medium-up-4 large-up-6 collapse">
  <div class="column"><img src="http://placehold.it/450" alt="" /></div>
  <div class="column"><img src="http://placehold.it/450" alt="" /></div>
  <div class="column"><img src="http://placehold.it/450" alt="" /></div>
  <div class="column"><img src="http://placehold.it/450" alt="" /></div>
  <div class="column"><img src="http://placehold.it/450" alt="" /></div>
  <div class="column"><img src="http://placehold.it/450" alt="" /></div>
</div>
            
          
!
            
              // demo styles
$primary-color: #1779ba;
$secondary-color: #767676;
$light-gray: #e6e6e6;
$success-color: #3adb76;

body {
  padding: 2rem;
}

.row {
  background: $light-gray;
  margin-bottom: 1rem;
}

.column,
.columns {
  background: $secondary-color;
  border: 5px solid black;
  
  &:nth-child(4) {
    height: 200px;
  }
  
  span {
    background: $primary-color;
    display: block;
    text-align: center;
    width: 100%;
  }
  
  > .row {
    .column,
    .columns {
      background: $success-color;
      border: 1px solid black;

      span {
        background: darken($success-color, 30%);
        display: block;
        text-align: center;
        width: 100%;
      }
    }
  }
}

.callout {
  background: $primary-color;
  text-align: center;
}

.box {
  height: 20px;
  width: 20px;
  display: inline-block;
  
  &.blue {
    background: $primary-color;
  }
  
  &.gray {
    background: $secondary-color;
  }
  
  &.black {
    background: #000;
  }
}
            
          
!
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