Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

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>Bootstrap 3</h1>
<hr>
<div class="container">
  <div class="row text-center">
    <h3>Centering a column using the <strong>offset</strong> prefix
    </h3> 
    <div class="col-sm-8 col-sm-offset-2 border">   
      <h2>.col-sm-offset-2</h2>
      <p>The row is incomplete only for small devices and up. By default, for extra small devices each row contains 12 columns (col-xs-12 class). For small devices and up it has the class col-sm-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>push</strong> prefix
    </h3>
    <div class="col-sm-8 col-sm-push-2 border">  
      <h2>.col-sm-push-2</h2>
      <p>The row is incomplete only for small devices and up. By default, for extra small devices each row contains 12 columns (col-xs-12 class). For small devices and up it has the class col-sm-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>hidden & visible</strong> prefixes
    </h3>
    <div class="col-sm-5 col-sm-offset-1 border mg">
      <h2>.hidden-xs</h2>
      <p>The text with the blue color below will be appearing only when the browser window has a width 768px and up.</p>
      <p class="hidden-xs 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="col-sm-5 border">
      <h2>.visible-sm</h2>
      <p>The text with the blue color below will be appearing only when the browser window has a width between 768px and 991px.</p>
      <p class="visible-sm 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>
</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;
}

body {
  font-size: 16px;
}

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

h3 {
  font-style: italic;
  margin-bottom: 20px;
}

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

.border p {
  font-weight: 350;
}

.color {
  color: steelblue;
}

.mg {
  margin-bottom: 20px;
}

.p {
  text-align: center;
}
              
            
!

JS

              
                
              
            
!
999px

Console