<header>
  <div class="container">
    <h1>Stephanie's Widget Store</h1>
  </div>
</header>
<main class="container">
  <h2>Products</h2>
  <section class="card-row">
    <article class="card">
      <img src="https://placeimg.com/320/240/tech" alt="Preview of Whizzbang Widget" />
      <h3>Whizzbang Widget SuperDeluxe <em>$25</em></h3>
      <p>
        Liquorice candy macaroon soufflé jelly cake. Candy canes ice cream
        biscuit marzipan. Macaroon pie sesame snaps jelly-o.
      </p>
      <a href="#" class="button">Add to Cart</a>
    </article>
    <article class="card">
      <img src="https://placeimg.com/320/240/tech" alt="Preview of Whizzbang Widget" />
      <h3>Whizzbang Widget SuperDeluxe <em>$25</em></h3>
      <p>
        Liquorice candy macaroon soufflé jelly cake. Candy canes ice cream
        biscuit marzipan. Macaroon pie sesame snaps jelly-o.
      </p>
      <a href="#" class="button">Add to Cart</a>
    </article>
    <article class="card">
      <img src="https://placeimg.com/320/240/tech" alt="Preview of Whizzbang Widget" />
      <h3>Whizzbang Widget SuperDeluxe <em>$25</em></h3>
      <p>
        Liquorice candy macaroon soufflé jelly cake. Candy canes ice cream
        biscuit marzipan. Macaroon pie sesame snaps jelly-o.
      </p>
      <a href="#" class="button">Add to Cart</a>
    </article>
  </section>
</main>
<footer>
  <div class="container">
    <p>&copy; 2020 ACME Company</p>
  </div>
</footer>
/* 
 * global. css 
 */
body {
  font-family: sans-serif;
  color: #222;
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0 0 0.35em;
}

h1 {
  font-size: 40px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0 0 1.15em;
}

.container {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 24px;
}

header {
  background-color: rebeccapurple;
  color: #fff;
}

body > footer {
  border-top: 2px solid rebeccapurple;
}

/* 
 * card-layout. css 
 */
.card-row {
  display: grid;
  grid-template-columns: repeat(3, 32%);
  justify-content: space-between;
}

.card {
  padding: 20px;
  border: 1px solid #c9c9c9;
  border-radius: 7px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

.card > img:first-child {
  border-radius: 7px 7px 0 0;
  margin-bottom: 20px;
  max-width: 100%;
  height: auto;
}

.card h3 {
  color: rebeccapurple;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
}

.card h3 em {
  padding: 0.25em;
  background-color: #eddbff;
  border-radius: 4px;
}

.card p {
  color: #757575;
  line-height: 1.5;
}

.button {
  /* Reset text link default */
  text-decoration: none;

  background-color: rebeccapurple;
  color: #fff;
  padding: 0.5em 1em;
  border-radius: 4px;
  display: inline-block;
}
View Compiled
/*
Read about this layout on DEV - this is for Episode 14 of my series on learning web development for beginners! https://dev.to/5t3ph/style-a-card-layout-with-css-23h

Or watch on YouTube: https://youtu.be/WtQMRsYWgzM
*/

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.