css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <header id="header">
  <img id="header-img" src="http://via.placeholder.com/200x50" alt="Company Logo" />
  <nav id="nav-bar">
    <ul>
      <li><a class="nav-link" href="#features">Features</a></li>
      <li><a class="nav-link" href="#video">Video</a></li>
      <li><a class="nav-link" href="#pricing">Pricing</a></li>
    </ul>
  </nav>
</header>

<main>
  <section id="email-signup">
    <form id="form" action="https://www.freecodecamp.com/email-submit">
      <label>Try It Out Now!</label>
      <input name="email" id="email" type="email" placeholder="Enter your email address" required/>
      <button id="submit" type="submit">Submit</button>
    </form>
  </section>
  
  <section id="features">
    <div class="desc">
      <i class="fa fa-check"></i>
      <h2>Premium Materials</h2>
      <p>Our products use the best parts which are sourced locally. This will increase the longevity of your purchase.</p>
    </div>
    
  <div class="desc">
    <i class="fa fa-check"></i>
    <h2>Fast Shipping</h2>
    <p>We make sure you recieve your order as soon as we have finished making it. We also provide free returns if you are not satisfied.</p>
  </div>

<div class="desc">
  <i class="fa fa-check"></i>
  <h2>Quality Assurance</h2>
  <p>For every purchase you make, we will ensure there are no damages or faults and we will check and test the integrity of your product.</p>
</div>
  </section>
  
  <iframe id="video" width="100%" height="315" src="https://www.youtube-nocookie.com/embed/2YBtspm8j8M?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  
  <section id="pricing">
    <div class="card" id="product-1">
      <div class="level">
        Product 1
      </div>
      <h2>$200</h2>
      <ol>
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum dolor.</li>
        <li>Lorem ipsum.</li>
      </ol>
      <button>Select</button>
    </div>
    <div class="card" id="product-2">
      <div class="level">
        Product 2
      </div>
      <h2>$800</h2>
      <ol>
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum dolor.</li>
        <li>Lorem ipsum.</li>
      </ol>
      <button>Select</button>
    </div>
    <div class="card" id="product-3">
      <div class="level">
        Product 3
      </div>
      <h2>$900</h2>
      <ol>
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum.</li>
        <li>Lorem ipsum dolor.</li>
        <li>Lorem ipsum.</li>
      </ol>
      <button>Select</button>
    </div>
  </section>
</main>

<footer id="footer">
  <span>Copyright 2018 &copy, Placeholder Company</span>
    <ul>
      <li><a href="#">Privacy</a></li>
      <li><a href="#">Terms</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
</footer>
            
          
!
            
              html,body{
  margin: 0;
  padding: 0;
  font-family: Arial;
  background-color: #eee;
}

/* HEADER & NAVIGATION */
#header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: #EEE;
  box-shadow: 0 0 2px #555;
  border-bottom: 1px solid #777;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 99;
}
#nav-bar ul {
  float: right;
  width: 100%;
  max-width: 500px;
  display: flex;
  justify-content: space-around;
  list-style: none;
  margin: 0;
  padding: 0;
}
#nav-bar ul li {width: 100%;}
#nav-bar ul li a {
  line-height: 53px;
  text-align: center;
  display: block;
  background-color: #ccc;
  height: 50px;
  text-decoration: none;
  color: #333;
}
#nav-bar ul li a:hover {
  background-color: #fff;
}

/* MAIN */
main {
  display: grid;
  max-width: 940px;
  padding: 40px 4%;
  margin: 70px auto 20px auto;
  background-color: #fff;
  box-shadow: 0 1px 2px #777;
}
iframe {
  margin: 0 auto;
}

/* FORM */
#email-signup {
  margin: 20px auto;
  width: 100%;
  background-color: #eee;
  box-shadow: 0 1px 1px #999;

}

#form {
  margin: 30px auto;
  display: flex;
  flex-direction: column;
  max-width: 300px;
  
}
#form label {
  text-align: center;
  font-size: 40px;
  margin-bottom: 10px;
}
#form input {
  padding: 10px;
  margin: 10px 0;
  font-size: 16px;
  text-align: center;
}
button {
  grid-column: 1/-1;
  padding: 10px;
  background-color: #e1e1e1;
  border: 1px solid #a1a1a1;
  font-size: 16px;
}
button:hover {
  background-color: #EEF;
  border: 1px solid #99F;
}

/* FEATURES */
#features {
  margin: 0 auto;
}
.desc {
  margin: 20px auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  border: 1px solid #777;
}
.desc i {
  align-self: center;
  margin: 0 auto 10px auto;
  font-size: 70px;
  grid-row: 1/3;
  color: #090;
}

/* VIDEO */
iframe {
  margin: 20px auto;
}

/* PRICING */
#pricing {
  margin: 20px 0;
  display: grid;
  grid-gap: 20px;
  grid-template-columns: 1fr 1fr 1fr;
}
.card {
  background-color: #eee;
  text-align: center;
  border: 1px solid #777;
  transition: all .15s ease-out;
}
 .card:hover {
  box-shadow: 0 4px 4px #777;
  transform: translateY(-4px);
}
.card ol {
  padding: 0;
  list-style: none;
  margin: 20px 0 30px 0;
}
.card button {
  width: 100%;
  border-bottom:none;
  border-left:none;
  border-right:none;
}
.level {
  background-color: #FFF;
  border-bottom: 1px solid #AAA;
  padding: 15px;
  font-size: 20px;
}

/* FOOTER */
#footer {
  padding: 10px;
  background-color: #CCC;
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: center;
  border-top: 1px solid #AAA;
}
#footer span {
  align-self: center;
  text-shadow: 0 1px 2px #fff;
}
#footer ul li {
  display: inline-block;
  margin-right: 15px;
}
#footer ul li a{
  text-decoration: none;
}

/* MOBILE */
@media (max-width: 760px) {
  main {
    margin-top: 125px;
  }
  #header {
    grid-template-columns: 1fr;
  }
  #header-img {
    justify-self: center;
  }
  #nav-bar ul {
    max-width: 100%;
  }
  .desc {
    grid-template-columns: 65px 1fr;
  }
  .desc i {
    margin-top: 10px;
    font-size: 40px;
    grid-row: 1/2;
  }
  .desc p {
    grid-column: 1/-1;
    margin: 0px 20px 15px 20px;
  }
  #pricing {
    grid-template-columns: 1fr;
  }
  #footer ul li {
    display: block;
    margin-bottom: 10px;
  }
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console