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

              
                
<div class="container">
  <ul class="cards">
    <li class="card1">
      <header>
      <h2>Card title 1</h2>
      </header>
      <div class="content">
        <p>Veggies es bonus vobis, proinde vos postulo essum magis. </p>
       </div>
        <footer> 
       <a href="/go-somewhere">More about card 1</a>
        </footer>
    </li>
        <li class="card2">
      <header>
      <h2>Card title 2</h2>
      </header>
      <div class="content">
        <p>Gumbo beet greens corn soko endive gumbo gourd</p>
       </div>
        <footer> 
       <a href="/go-somewhere">More about card 2</a>
        </footer>
    </li>
        <li class="card3">
      <header>
      <h2>Card title 3</h2>
      </header>
      <div class="content">
        <p>Turnip greens yarrow ricebean rutabaga endive cauliflower.</p>
       </div>
        <footer> 
       <a href="/go-somewhere">More about card 3</a>
        </footer>
    </li>
        <li class="card4">
      <header>
      <h2>Card title 4</h2>
      </header>
      <div class="content">
        <p>Lotus root water spinach fennel kombu maize bamboo shoot. </p>
       </div>
        <footer> 
       <a href="/go-somewhere">More about card 4</a>
        </footer>
    </li>
        <li class="card5">
      <header>
      <h2>Card title 5</h2>
      </header>
      <div class="content">
        <p>Brussels sprout coriander water chestnut gourd swiss chard.</p>
       </div>
        <footer> 
       <a href="/go-somewhere">More about card 5</a>
        </footer>
    </li>
        <li class="card6">
      <header>
      <h2>Card title 6</h2>
      </header>
      <div class="content">
        <p>Nori grape silver beet broccoli kombu beet greens fava bean potato quandong celery.  </p>
       </div>
        <footer> 
       <a href="/go-somewhere">More about card 6</a>
        </footer>
    </li>
        <li class="card7">
      <header>
      <h2>Card title 7</h2>
      </header>
      <div class="content">
        <p>Celery quandong swiss chard. </p>
       </div>
        <footer> 
       <a href="/go-somewhere">More about card 7</a>
        </footer>
    </li>
        <li class="card8">
      <header>
      <h2>Card title 8</h2>
  
      </header>
      <div class="content">
        <p>Gumbo kakadu plum komatsuna black-eyed pea.</p>
        </div>
       <footer> 
       <a href="/go-somewhere">More about card 8</a>
        </footer>
    </li>
  </ul>
</div>
              
            
!

CSS

              
                * { box-sizing: border-box; }

body {
  margin: 0;
  padding: 40px;
  font: 1.2em 'Open Sans', sans-serif;
  background-color: #fff;
}

.container {
  background-color: #ddddda;
  width: 1280px;
  padding: 20px 40px;
  position: relative;
}

ul {
  font: 1em 'Averia Serif Libre', cursive;
  list-style-type: none;
  margin: 0;
  padding: .5em;
  background-color: #fff;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(6, minmax(0,1fr));
  grid-template-areas: "a a b b b b"
    "c c d d e e"
    "f f g g h h";
}

.cards li {
  background-color: #374785;
  color: #fff;
  border-radius: .2em;  
  padding: .5em;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.cards footer {
  justify-self: center;
}

.cards footer a {
  display: inline-block;
  padding: .5em;
  color: #fff;
  text-decoration: none;
  background-color: #24305e;
  border-radius: .2em;
}

.cards footer a:hover,
.cards footer a:focus {
  background-color: #f76c6c;
  color: #171717;
}

.cards h2 {
  margin: 0;
}

.card1 {
  grid-area: c;
}

.card2 {
  grid-area: f;
}
.card3 {
  grid-area: d;
}
.card4 {
  grid-area: h;
}
.card5 {
  grid-area: e;
}
.card6 {
  grid-area: a;
}
.card7 {
  grid-area: g;
}
.card8 {
  grid-area: b;
}
              
            
!

JS

              
                
              
            
!
999px

Console