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. 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

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

              
                .container
  h1 Bootstrap 3.1 - Vertical align into a Grid v2
  
  section
    .row.row-table
      / col 1
      .col-sm-4.td-top
        p
          img.img-responsive src="http://lorempixel.com/250/300/fashion/3/"
        h4 Vertical Align Top
        p Candy canes jelly-o icing bonbon marzipan chocolate carrot cake jelly. Candy canes soufflé jelly chupa chups cupcake cake.

      / col 2
      .col-sm-5
        h4 Vertical Middle (default)
        .row.row-table.row-table-xs
          .col-xs-6.td-top
            p Jelly-o dragée ice cream brownie. Candy oat cake tiramisu donut chocolate cake bonbon. Cake toffee lollipop sweet roll fruitcake danish tart tiramisu candy canes.

          .col-xs-6.td-top
            img.img-responsive src="http://lorempixel.com/200/150/cats/1/"

      / col 3
      .col-sm-3.td-bottom
        h4 Vertical Align Bottom
        p Tart gummi bears wafer jelly. Cheesecake chocolate cake candy pudding pastry toffee cookie chupa chups biscuit.

[[[//codepen.io/manumorante/pen/FsGHp.html]]]
              
            
!

CSS

              
                /*
  MM Grid as table (Twitter Bootstrap)
  Manu Morante @unavezfui
  Last update: October 08, 2014
  https://codepen.io/unavezfui/pen/JzcGx

  Use ".row-table-xs" in ".row" when you need cols in xsmall version (.col-sx-...)

  <div class="row row-table row-table-xs">
    <div class="col-xs-6"> ...  </div>
    <div class="col-xs-6"> ... </div>
  </div>
*/

// Bootstrap: Small screen / tablet
$screen-sm: 768px;

@mixin row-table {
  display: table !important;

  > [class*="col-"]{
    float:none!important;
    display: table-cell!important;
    vertical-align: middle;
    &.td-top{ vertical-align: top!important; }
    &.td-bottom { vertical-align: bottom!important; }
  }  
}
.row-table.row-table-xs {
  @include row-table;
}
@media (min-width: $screen-sm) {
  .row-table {
    @include row-table;
  }
};



// =======================
// Pen decoration ;-)
// =======================
body{
  margin: 4em 0;
  background: #000 url(http://lorempixel.com/1500/1500/abstract/2/) top center;
  background-size: cover;
  color: white;
  font-family: 'Raleway', sans-serif;
}

h1{
  font-family: 'Nunito', sans-serif;
}

section{
  background: rgba(white, .9);
  color: black;
  margin-bottom: 1em;
  padding: 2em;
  box-shadow: 5px 5px 10px rgba(#000, .2);
  border-radius: 8px;
  
  img {
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(#000, .2);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console