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

              
                <h2>Cards</h2>

<p>A card is just an element with a <code>.card</code> class applied. You can put any kind of content inside.
Make sure you wrap your content in a <code>.card-section</code> element in order to achieve the traditional card look.</p>

<p>A card container has no padding, allowing you to place full-bleed images inside. Use the <code>.card-divider</code> and <code>.card-section</code> classes to sub-divide a card.</p>

<p>You can arrange the card classes in any order that suits your content. See below:</p>

<div class="row medium-unstack">
  <div class="column medium-4">
    <div class="card">
      <div class="card-divider">
        This is a header
      </div>
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
    </div>
  </div>
  <div class="column medium-4">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column medium-4">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-divider">
        What's going on here?
      </div>
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
    </div>
  </div>
</div>

<p>Place your image inside the <code>.card-section</code> wrapper to have padding around it.</p>

<div class="row medium-unstack">
  <div class="column medium-4">
    <div class="card">
      <div class="card-section">
        <img src="http://fillmurray.com/500/300">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column medium-4">
    <div class="card">
      <div class="card-section">
        <img src="http://fillmurray.com/500/300">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column medium-4">
    <div class="card">
      <div class="card-section">
        <img src="http://fillmurray.com/500/300">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
</div>

<p>As you can see, sizing the cards within grid columns works well. You can use the Foundation <a href="https://foundation.zurb.com/sites/docs/flex-grid.html#block-grids">Block Grid</a> for even width cards.</p>

<div class="row small-up-2 medium-up-3 large-up-4 align-center">
  <div class="column">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="card">
      <img src="http://fillmurray.com/500/300">
      <div class="card-section">
        <h4>This is a card.</h4>
        <p>It has an easy to override visual style, and is appropriately subdued.</p>
      </div>
      <div class="card-divider">
        <ul class="menu">
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
        </ul>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                body {
  margin: 2rem;
}
              
            
!

JS

              
                $(document).foundation();


              
            
!
999px

Console