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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <h4>Basic Grids</h4>
<div class="row">
  <div class="row_cell">1</div>
</div>

<div class="row">
  <div class="row_cell">1/3</div>
  <div class="row_cell">1/3
    <h6> This one is got more text than the other. Yet, the height remains the same accross the separate columns <h6>
  </div>
  <div class="row_cell">1/3</div>
</div>

<div class="row">
  <div class="row_cell">1/3</div>
  <div class="row_cell">1/3</div>
  <div class="row_cell">1/3</div>
</div>


<h4> Cells with specific sizes </h4>
<div class="row">
  <div class="row_cell--2">2x</div>
  <div class="row_cell">1x</div>
</div>

<div class="row">
  <div class="row_cell--3">3x</div>
  <div class="row_cell">1x</div>
  <div class="row_cell">1x</div>
</div>
    
<h4>Specific alignments</h4>
<div class="row">
  <div class="row_cell row_cell--top">top</div>
  <div class="row_cell">1/3
    <h6> This one is got more text than the other. Yet, the height remains the same accross the separate columns <br/>
      It's got even more text like this one. Why does it have so much text? Nothing really. Just so it's easier to see the alignment options of the other cells...<h6>
  </div>
  <div class="row_cell">1/3</div>
</div>    
    
<div class="row">
  <div class="row_cell">1/3</div>
  <div class="row_cell">1/3
    <h6> This one is got more text than the other. Yet, the height remains the same accross the separate columns <br/>
      It's got even more text like this one. Why does it have so much text? Nothing really. Just so it's easier to see the alignment options of the other cells...<h6>
  </div>
  <div class="row_cell row_cell--bottom">bottom</div>
</div> 
    
<div class="row">
  <div class="row_cell row_cell--center">center</div>
  <div class="row_cell">1/3
    <h6> This one is got more text than the other. Yet, the height remains the same accross the separate columns <br/>
      It's got even more text like this one. Why does it have so much text? Nothing really. Just so it's easier to see the alignment options of the other cells...<h6>
  </div>
  <div class="row_cell">1/3</div>
</div>     
    
<h4>entire row alignment</h4>
    
<div class="row row--top">
  <div class="row_cell">top</div>
  <div class="row_cell">top
    <h6> This one is got more text than the other. Yet, the height remains the same accross the separate columns <br/>
      It's got even more text like this one. Why does it have so much text? Nothing really. Just so it's easier to see the alignment options of the other cells...<h6>
  </div>
  <div class="row_cell">top</div>
</div> 


<div class="row row--center">
  <div class="row_cell">center</div>
  <div class="row_cell">center
    <h6> This one is got more text than the other. Yet, the height remains the same accross the separate columns <br/>
      It's got even more text like this one. Why does it have so much text? Nothing really. Just so it's easier to see the alignment options of the other cells...<h6>
  </div>
  <div class="row_cell">center</div>
</div>
    
 
 
<div class="row row--bottom">
  <div class="row_cell">bottom</div>
  <div class="row_cell">bottom
    <h6> This one is got more text than the other. Yet, the height remains the same accross the separate columns <br/>
      It's got even more text like this one. Why does it have so much text? Nothing really. Just so it's easier to see the alignment options of the other cells...<h6>
  </div>
  <div class="row_cell">bottom</div>
</div>     
    
    
<h4>Nested Rows</h4>    
<div class="row">
  <div class="row_cell--2">2x
  <div class="row row--center">
  <div class="row_cell">center</div>
  <div class="row_cell">center
    <h6> This one is got more text than the other<h6>
  </div>
  <div class="row_cell">center</div>
</div>
  </div>
  <div class="row_cell">1x</div>
</div>
    
  
              
            
!

CSS

              
                /* = ===== 
FLexbox Grids 
=========*/
.row {
   display: flex;
   flex-wrap: wrap;
}


.row_cell {
   flex: 1
}
.row_cell--2 {
   flex: 2
}
.row_cell--3 {
   flex: 3
}


.row_cell--top {
  align-self: flex-start
}
.row_cell--bottom {
  align-self: flex-end
}
.row_cell--center {
  align-self: center
}


.row--top {
   align-items: flex-start
}
.row--bottom {
   align-items: flex-end
}
.row--center {
   align-items: center
}


/*= ======
visuals
=======*/
.row {
  padding: 15px;
  background: rgba(0,0,0,0.08);
  margin: 8px 0;
}
.row_cell,
.row_cell--2,
.row_cell--3 {
  background: rgba(0,0,0,0.13);
  padding: 10px;
  margin: 5px;
}

body {
  color: rgba(0,0,0,0.7);
  font-size: 0.9em;
}

h4 {
  padding: 20px 10px 10px;
  font-style: italic;
  text-decoration: underline;
  font-weight: bold;
}
              
            
!

JS

              
                
              
            
!
999px

Console