Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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 class="header"/>
  <h1>CSS Columns V3</h1>
</header>

<div class="grid">
  
  <div class="module">
    <div class="module-inner">
      <img src="http://placehold.it/750x850?text=IMG"/>
      <h3>Lorem Ipsum</h3>
      <p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores.</p>
    </div>
  </div>

  <div class="module">
    <div class="module-inner">
      <ul>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
      </ul>
    </div>
  </div>

  <div class="module">
    <div class="module-inner">
      <ul>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
        <li class="media">
          <div><img src="http://placehold.it/750x750?text=IMG"/></div>
          <h3>Lorem Ipsum</h3>
        </li>
      </ul>
    </div>
  </div>
    
  <div class="module">
    <div class="module-inner">
      <img src="http://placehold.it/950x550?text=IMG"/>
      <h3>Lorem Ipsum</h3>
      <p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores.</p>
    </div>
  </div>
  
  <div class="module">
    <div class="module-inner">
      <img src="http://placehold.it/750x450?text=IMG"/>
      <h3>Lorem Ipsum</h3>
      <p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores.</p>
    </div>
  </div>
  
  <div class="module">
    <div class="module-inner">
      <img src="http://placehold.it/750x950?text=IMG"/>
      <h3>Lorem Ipsum</h3>
      <p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores.</p>
    </div>
  </div>
  
</div>

<footer class="footer">
  <p>Bottom of the page</p>
</footer>
              
            
!

CSS

              
                // Column Grid CSS
.grid{
  width: 96%;
  max-width: 1500px;
  margin: 3% auto;
  @media screen and (min-width: 310px){
    // set a minimum suggested width
    column-width: 300px;
    // set a max number of columns
    column-count: 3;
    column-gap: 2.5em;
  }
  // Adding an inner div ¯\_(ツ)_/¯ so i can display: block the module and display: inline-block the inner module. This removes additional space below .grid in Chrome
  .module{
    display: block;
  }
  .module-inner{
    @media screen and (min-width: 310px){
      display: inline-block; 
    }
    overflow: hidden;
    min-width: 300px;
    width: 100%;
    background: #f5f5f5;
    padding: 1em;
    box-sizing: border-box;
    margin-bottom: 3em;
  }
}

// Base Styling
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,900');
html, body{
  margin: 0;
}

body{
  line-height: 1.6;
  font-family: 'Source Sans Pro', sans-serif;
  color: #333;
}

h1, h2{
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1.55rem;
  line-height: 1.25em;
  font-weight: 900;
  margin: 0;
}

h3{
  font-weight: 900;
  margin-bottom: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul{
  padding: 0;
  margin: 0;
  li{
    margin-bottom: 1em;
  }
}

p{
  margin-top: 0;
}

header, footer{
  background: #333;
  text-align: center;
  color: white;
  padding: calc(4vh + 2em);
  h1{
    font-size: 4vw;
  }
  p{
    margin-bottom: 0;
  }
}
footer{
  margin-bottom: 0;
  padding: 2vh;
}

.media {
  display: flex;
  h3 {
    padding-left: 1rem;
    padding-right: 1rem;
    margin: auto 0;
  }
  img{
    max-width: 100px;
  }
}



              
            
!

JS

              
                
              
            
!
999px

Console