Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h1>Foundation 5</h1>
<hr>
<div class="row text-center">
  <h3>Centering a column using the <strong>offset</strong> prefix
  </h3>
  <div class="medium-8 medium-offset-2 columns border">
    <h2>.medium-offset-2</h2>
    <p>The row is incomplete only for medium devices and up. By default, for small devices each row contains 12 columns (small-12 class). For medium devices and up it has the class medium-8. That means, its width is 66.66% of the row's width. With the offset class we give a margin-left equals to 16.66%, and thus, it becomes centered.</p>
  </div>
</div>
<hr>
<div class="row text-center">
  <h3>Centering a column using the <strong>centered</strong> prefix
  </h3>
  <div class="medium-8 medium-centered columns border">
    <h2>.medium-centered</h2>
    <p>Foundation offers this handy class that helps centered a column within a row without needed to offsetting it. The column will be centered for medium devices and up.</p>
  </div>
</div>
<hr>
<div class="row text-center">
  <h3>Centering a column using the <strong>push</strong> prefix
  </h3>
  <div class="medium-8 medium-push-2 columns border">
    <h2>.medium-push-2</h2>
    <p>The row is incomplete only for medium devices and up. By default, for small devices each row contains 12 columns (small-12 class). For medium devices and up it has the class medium-8. That means, its width is 66.66% of the row's width. With the push class we move the column to the right 16.66% of its original position, and thus, it becomes centered.</p>
  </div>
</div>
<hr>
<div class="row text-center">
  <h3>Showing text using the <strong>show</strong> prefix
  </h3>
  <div class="medium-5 medium-offset-1 columns border">
    <h2>.show-for-medium-up</h2>
    <p>The text with the blue color below will be appearing only when the browser window has a width 641px and up.</p>
    <p class="show-for-medium-up color">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  </div>
  <div class="medium-5 columns border">
    <h2>.show-for-medium-only</h2>
    <p>The text with the blue color below will be appearing only when the browser window has a width between 641px and 1024px.</p>
    <p class="show-for-medium-only color">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  </div>
</div>

<p class="p">Demo by George Martsoukos. <a href="http://www.sitepoint.com/grid-system-comparison-bootstrap-vs-foundation" target="_blank">See article</a>.</p>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700);

body, h1, h2, h3 {
  font-family: 'Source Sans Pro', sans-serif;
}

h1 {
  font-weight: 700;
  text-align:center;
}

h3 {
  font-style: italic;
}

.border {
 margin: 20px 0;
 padding: 10px;
 background: #ededed;
 border: 1px solid #ccc;
}

.border p {
  font-weight: 350;
}

.color {
  color: steelblue;
}

.p {
  text-align: center;
}
              
            
!

JS

              
                
              
            
!
999px

Console