css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <h1 class="text-center">Foundation 5</h1>
<h2 class="text-center">Resize the window to see the grid that's being used.</h2>
<hr>

<!--SMALL GRID-->
<div class="row text-center show-for-small-only">        
  <h3>At this point, the window width is up to 640px <strong></strong>. You'll use Foundation's grid for <strong class="bg-color">small screens</strong>.</h3>
  <h4>The size of each row can't exceed the 1000px.</h4>
  <hr>
  <h4>Each row can have up to 12 columns.</h4>
  <hr>
  <h4>For default grid, the class prefix you can use to set the size of your columns is <code>small-#</code>.</h4>
  <p>For instance, if you want two equal-sized columns, you'll use the <code>small-6</code> class.</p>
  <p>Keep in mind that in case you'll not specify a column size for small screens, they will be appearing stacked. That means, they will occupy the full width of their container (<code>small-12</code>).</p>
  <hr>
  <h4>For block grid, the class prefix you can use to set the size of your columns is <code>small-block-grid-#</code>.</h4>
  <p>For instance, if you want two equal-sized columns, you'll use the <code>small-block-grid-6</code> class.</p>
  <p>Using <strong>offset</strong> classes (for example, <code>small-offset-2</code>) you can center or move columns to the right. These classes change the <code>margin-left</code> value of each column.</p>
  <p>Using <strong>push & pull</strong> classes (for example, <code>small-push-2</code>) you can move columns to the left and right respectively. These classes change the <code>left</code> and <code>right</code> values of each column.</p>
  <p>Using <strong>visibility</strong> classes (for example, <code>hide-for-small-only</code>) you can adjust the content that will be appearing in this viewport size.</p>
  <p>Demo by George Martskoukos. <a href="http://www.sitepoint.com/grid-system-comparison-bootstrap-vs-foundation" target="_blank">See article</a>.</p>
</div>

<!--MEDIUM GRID-->
<div class="row text-center show-for-medium-only">
  <h3>At this point, the window width is 641px and up <strong></strong>. You'll use Foundation's grid for <strong class="bg-color">medium screens</strong>.</h3>
  <h4>The size of each row can't exceed the 1000px.</h4>
  <hr>
  <h4>Each row can have up to 12 columns.</h4>
  <hr>
  <h4>For default grid, the class prefix you can use to set the size of your columns is <code>medium-#</code>.</h4>
  <p>For instance, if you want two equal-sized columns, you'll use the <code>medium-6</code> class.</p>
  <p>Keep in mind that in case you'll not specify a column size for medium screens, they will inherit the styles from the small screens.</p>
  <hr>
  <h4>For block grid, the class prefix you can use to set the size of your columns is <code>medium-block-grid-#</code>.</h4>
  <p>For instance, if you want two equal-sized columns, you'll use the <code>medium-block-grid-6</code> class.</p>
  <hr>
  <p>Using <strong>offset</strong> classes (for example, <code>medium-offset-2</code>) you can center or move columns to the right. These classes change the <code>margin-left</code> value of each column.</p>
  <p>Using <strong>push & pull</strong> classes (for example, <code>medium-push-2</code>) you can move columns to the left and right respectively. These classes change the <code>left</code> and <code>right</code> values of each column.</p>
  <p>Using <strong>visibility</strong> classes (for example, <code>show-for-medium-only</code>) you can adjust the content that will be appearing in this viewport size.</p>
  <hr>
  <p>Demo by George Martskoukos. <a href="http://www.sitepoint.com/grid-system-comparison-bootstrap-vs-foundation" target="_blank">See article</a>.</p>
</div>

<!--LARGE GRID-->
<div class="row text-center show-for-large-only">
  <h3>At this point, the window width is 1025px and up <strong></strong>. You'll use Foundation's grid for <strong class="bg-color">large screens</strong>.</h3>
  <h4>The size of each row can't exceed the 1000px.</h4>
  <hr>
  <h4>Each row can have up to 12 columns.</h4>
  <hr>
  <h4>For default grid, the class prefix you can use to set the size of your columns is <code>large-#</code>.</h4>
  <p>For instance, if you want two equal-sized columns, you'll use the <code>large-6</code> class.</p>
  <p>Keep in mind that in case you'll not specify a column size for large screens, they will inherit the styles from the previous screens.</p>
  <hr>
  <h4>For block grid, the class prefix you can use to set the size of your columns is <code>large-block-grid-#</code>.</h4>
  <p>For instance, if you want two equal-sized columns, you'll use the <code>large-block-grid-6</code> class.</p>
  <hr>
  <p>Using <strong>offset</strong> classes (for example, <code>large-offset-2</code>) you can center or move columns to the right. These classes change the <code>margin-left</code> value of each column.</p>
  <p>Using <strong>push & pull</strong> classes (for example, <code>large-push-2</code>) you can move columns to the left and right respectively. These classes change the <code>left</code> and <code>right</code> values of each column.</p>
  <p>Using <strong>visibility</strong> classes (for example, <code>show-for-large-only</code>) you can adjust the content that will be appearing in this viewport size.</p>
  <hr>
  <p>Demo by George Martskoukos. <a href="http://www.sitepoint.com/grid-system-comparison-bootstrap-vs-foundation" target="_blank">See article</a>.</p>
</div>

<!--XLARGE GRID-->
<div class="row text-center show-for-xlarge-only">
  <h3>At this point, the window width is 1441px and up <strong></strong>.</h3>
  <p>In order to be able to use Foundation's grid for <strong>xlarge devices</strong> you have to activate it. To do this, uncomment and set the <code>$include-xl-html-grid-classes</code> and <code>$include-xl-html-block-grid-classes</code> variables to <code>true</code>. These variables can be found in the <code>_settings.scss</code> partial.</p>
  <p>Keep in mind that in case you'll not specify a column size for xlarge screens, they will inherit the styles from the previous screens.</p>
  <p>Demo by George Martskoukos. <a href="http://www.sitepoint.com/grid-system-comparison-bootstrap-vs-foundation" target="_blank">See article</a>.</p>
</div>

<!--XXLARGE GRID-->
<div class="row text-center show-for-xxlarge-only">
  <h3>At this point, the window width is 1921px and up <strong></strong>.</h3>
  <p>In order to be able to use Foundation's grid for <strong>xxlarge devices</strong> you have to activate it. To do this, uncomment and set the <code>$include-xl-html-grid-classes</code> and <code>$include-xl-html-block-grid-classes</code> variables to <code>true</code>. These variables can be found in the <code>_settings.scss</code> partial.</p>
  <p>Keep in mind that in case you'll not specify a column size for xxlarge screens, they will inherit the styles from the previous screens.</p>
  <p>Demo by George Martskoukos. <a href="http://www.sitepoint.com/grid-system-comparison-bootstrap-vs-foundation" target="_blank">See article</a>.</p>
</div>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700);

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

h1 {
  font-weight: 700;
}

a {
  color: white;
}

h3 {
  margin-bottom: 25px;
}

.bg-color {
  background: #bdbd00;
  padding: 3px;
}

h4, p {
  margin-bottom: 15px;
}

@media only screen and (max-width:40em) {
  body {
    background: lightblue;
  }
}

@media only screen and (min-width: 40.063em) {
  body {
    background: #4baac8;
  }
}

@media only screen and (min-width: 64.063em) {
  body {
    background: LightSteelBlue;
  }
}

@media only screen and (min-width: 90.063em) {
  body {
    background: #688ec0;
  }
}

@media only screen and (min-width: 120.063em) {
  body {
    background: #cdd9ea;
  }
}
            
          
!
            
              $(window).on('load resize', function(){
  var $browserWidth = $(window).width();
  $('h3 strong:first-child').text('(' + $browserWidth + 'px)').css('color', 'white');
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console