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="price_table">
  <div class="package package_free">
    <h2>Free</h2>
    <div class="price">£<div class="big">0</div>/mo</div>
    <p>Sign up today for a free account and receive: </p>
    <ul>
      <li>1 email address</li>
      <li>1GB of cloud storage</li>
      <li>Realtime Backup</li>
      <li>End-to-end encryption</li>
      <li>Access to our mobile apps</li>
    </ul>
    <button>Learn more</button>
  </div>
  <div class="package package_bronze">
    <div class="banner">Most Popular</div>
    <h2>Bronze</h2>
    <div class="price">£<div class="big">5</div>/mo</div>
    <p>Includes everything in our Free package plus:</p>
    <ul>
      <li>5 email address</li>
      <li>5GB of cloud storage</li>
      <li>Two-factor authentication (2FA)</li>
      <li>Unlimited access</li>
      <li>VPN Lite</li>
      <li>Premium Support</li>
    </ul>
    <button>Learn more</button>
  </div>
  <div class="package package_silver">
    <h2>Silver</h2>
    <div class="price">£<div class="big">10</div>/mo</div>
    <p>Includes everything in our Bronze package plus:</p>
    <ul>
      <li>10 email address</li>
      <li>50GB of cloud storage</li>
      <li>File recovery</li>
      <li>Advanced dashboard</li>
      <li>Platinum Support</li>
    </ul>
    <button>Learn more</button>
  </div>
  <div class="package package_gold">
    <h2>Gold</h2>
    <div class="price">£<div class="big">19</div>/mo</div>
    <p>Includes everything in our Silver package plus:</p>
    <ul>
      <li>Unlimited email address</li>
      <li>100GB of cloud storage</li>
      <li>Reseller options</li>
      <li>Event invitations</li>
      <li>Access to Creators Club</li>
    </ul>
    <button>Learn more</button>
  </div>
</div>
              
            
!

CSS

              
                :root {
  --col-primary: #296eb3;
  --col-secondary: #003b81;
  --col-background: #e8e8e8;
  --col-light: #e8e8e8;
  --col-dark: #022f64;

  --col-free: #7dbaff;
  --col-bronze: #b85a24;
  --col-silver: #8a8a8a;
  --col-gold: #e2a922;
}

body {
  font-size: 100%;
  padding: 1em;
  background: var(--col-background);
  font-family: "Noto Sans", sans-serif;
}

.price_table {
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  align-items: start;
  column-gap: 2rem;
  row-gap: 2rem;
  max-width: 80em;
}

.package {
  border-radius: 4px;
  background: white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;

  h2 {
    margin: 0;
    padding: 1rem;
    background: var(--col-primary);
    font-size: 1.2em;
    text-align: center;
    font-weight: normal;
    color: white;
    position: relative;
    &::after {
      content: "";
      position: absolute;
      width: 100%;
      height: 0.4rem;
      left: 0;
      bottom: 0;
    }
  }
  .price {
    padding: 0.2rem 1rem;
    background: linear-gradient(
      45deg,
      var(--col-secondary) 0%,
      var(--col-dark) 100%
    );
    color: white;
    text-shadow: 0 4px 0 var(--col-dark);
  }
  p {
    padding: 1rem;
  }
  .price {
    font-size: 1.2em;
    font-weight: normal;
    text-align: center;
    box-shadow: inset 0 10px 4px -6px rgba(0, 0, 0, 0.1);
  }
  .big {
    display: inline;
    font-size: 4em;
    font-weight: 700;
  }
  ul {
    list-style: none;
    padding: 0 0 1rem 0;
    margin: 0;
    border-bottom: 1px solid var(--col-primary);
  }
  li {
    padding: 0.8em 1em;
    font-size: 0.9em;
    &:nth-child(odd) {
      background: var(--col-light);
    }
  }
  button {
    cursor: pointer;
    padding: 1em 2em;
    font-size: 1rem;
    display: block;
    color: white;
    margin: 1rem auto;
    border: none;
    border-radius: 5px;
    background: linear-gradient(
      0deg,
      var(--col-secondary) 0%,
      var(--col-primary) 100%
    );
    transition: all 0.2s;
    &:hover,
    &:focus {
      background: linear-gradient(
        0deg,
        var(--col-secondary) 0%,
        var(--col-dark) 100%
      );
      box-shadow: 0 0 0 4px white, 0 0 0 8px var(--col-primary);
      outline: 0;
    }
  }
  .banner {
    background: linear-gradient(90deg, #33a530 0%, #4eee49 50%, #33a530 100%);
    transform: rotate(-45deg);
    position: absolute;
    z-index: 1;
    padding: 0.5rem 4rem;
    top: 2rem;
    left: -4rem;
    border: 2px solid #91ff69;
    box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.2);
  }
}

.package_free h2::after {
  background: var(--col-free);
  background: linear-gradient(
    90deg,
    var(--col-free) 0%,
    white 50%,
    var(--col-free) 100%
  );
}

.package_bronze h2::after {
  background: linear-gradient(
    90deg,
    var(--col-bronze) 0%,
    white 50%,
    var(--col-bronze) 100%
  );
}

.package_silver h2::after {
  background: linear-gradient(
    90deg,
    var(--col-silver) 0%,
    white 50%,
    var(--col-silver) 100%
  );
}

.package_gold h2::after {
  background: linear-gradient(
    90deg,
    var(--col-gold) 0%,
    white 50%,
    var(--col-gold) 100%
  );
}

              
            
!

JS

              
                
              
            
!
999px

Console