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.

            
              <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>Columns in a flex grid will not wrap if not given an explicit size—this is what allows the magical auto-sizing to work. To make columns stack on smaller screens, add the class <code>.small-12</code> manually.</p>

<p>To switch back to the expand behavior from a percentage or shrink behavior, use the classes <code>.medium-expand</code> or <code>.large-expand</code>. In the below example, the columns stack on small screens, and become even-width on large screens. Again, since Foundation is mobile first, <code>.medium-</code> is medium and larger unless another class overrides it like <code>.large-</code></p>

<div class="row">
  <div class="small-12 medium-expand columns"><span>Medium Expand</span></div>
  <div class="small-12 medium-expand columns"><span>Medium Expand</span></div>
  <div class="small-12 medium-expand columns"><span>Medium Expand</span></div>
  <div class="small-12 large-expand columns"><span>Large Expand</span></div>
  <div class="small-12 large-expand columns"><span>Large Expand</span></div>
  <div class="small-12 large-expand columns"><span>Large Expand</span></div>
</div>

<p>In  this example, all of these columns will stack on the small breakpoint and the <code>.large-expand</code> columns will unstack and expand on the large breakpoint.</p>
            
          
!
            
              // 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;
  
  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
Loading ..................

Console