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

              
                <header>
	<h3>Flexbox Sticky Footer!</h3>
</header>

<div class="row">
  <div class="item">
		<h2 class="title">Meow Flexbox!</h2>

    <img src="//placekitten.com/g/600/600" alt="meow">

    <p class="text">This is how you get text to always be at the bottom of flexbox items.</p>

    <div class="text-bottom"><p>Please stay at the bottom.</p></div>
	</div>

  <div class="item">
		<h2 class="title">Meow Flexbox!</h2>

    <img src="//placekitten.com/g/600/600" alt="meow">

    <div class="text-bottom"><p>Please stay at the bottom.</p></div>
	</div>

  <div class="item">
		<h2 class="title">Meow Flexbox!</h2>
     
    <img src="//placekitten.com/g/600/600" alt="meow">
    
    <div class="text-bottom"><p>Please stay at the bottom.</p></div>
	</div>
  
  <div class="item">
		<h2 class="title">Meow Flexbox!</h2>
 
    <img src="//placekitten.com/g/600/600" alt="meow">

    <div class="text-bottom"><p>Please stay at the bottom.</p></div>
	</div>
</div>
              
            
!

CSS

              
                @import "compass/css3";

// =============================================
// Demo General Styles
// =============================================

* {
  box-sizing: border-box;
}

header {
  padding: 6px 0;
  text-align: center;
}

.item {
	margin: 0 1.5%; // 1.5% because I'm a cold hard criminal brochacho. #randomvaluesmakemecrazy
  background: #eee; // make it pretty.
}

.title {
  background: white;
}

.text {
  background: gray;
}

.text-bottom {
  background: red;
  color: white;
}


// =============================================
// The Flexbox Sticky Footer Shuffle
// =============================================

.row {
  display: flex;
  flex-direction: row;
  align-items: stretch; // this is set by default. you can use it or not.

  // Need this for images inside a flexbox
  // container otherwise shit stretches.
  img {
    width: 100%;
    height: auto;
  }
}

.item {
  display: flex; // set the context
  flex: 1; // flex an equal space for the entire container sire.
  align-items: stretch; // make my junk stretch the complete height sir mixalot.
  flex-direction: column; // stuff can't be a row. gotstah be a column.
}

.text-bottom {
  display: flex; // set the context
  flex: 1; // flex an equal amt of space yo!
  align-items: flex-end; // make that shit sit on the bottom dawg.
}
              
            
!

JS

              
                
              
            
!
999px

Console