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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>FCC: Product Landing Page Project</title>
</head>

<body>
  <div id="container">
    <header id="header">
       <div class="header-logo-container">
          <a href="#sec1"><img id="header-img" src="http://imgplaceholder.com/50x50/transparent/000000/fa-500px" alt="TerrySmith.io"><span class="logo">TerrySmith.io</span></a>
      </div>
      <nav id="nav-bar" class="flex-container">
        <ul class="nav flex-container flex-item flex-end item-center">
          <li><a class="nav-link" href="#sec1">Product</a></li>
          <li><a class="nav-link" href="#sec2">Overview</a></li>
          <li><a class="nav-link" href="#sec3">Tech Specs</a></li>
          <li><a><span class="shop-cart"></span></a></li>
        </ul>
      </nav>
    </header>
    <main>
      <section id="sec1">
        <div class="flex-container productflex">
          <div class='product-image flex-item flex-start'>
            <img alt="product image" src='http://content.competitivecyclist.com/images/items/900/AAS/AAS001A/RDSWI.jpg' />
          </div>
          <div class='product-buy-box flex-item'>
            <h3 class="brand">GIO-TERREPPE</h3>
            <span class="product-name">Terreppe Jersey - Men's</span>
            <div class="product-bar"></div>
            <div class="price-display">
              <span class="">Your Price: </span>
              <span class="">$122.46</span> </span>
            </div>
            <div class="size-range">
              <span>Size</span>
              <div class="size-selector-list">
                <a href="javascript:;" class="size-button">S</a>
                <a href="javascript:;" class="size-button">M</a>
                <a href="javascript:;" class="size-button">L</a>
              </div>
            </div>
            <div class="dropdown-label">Quantity</div>
            <select required id="dropdown">
                                <option value="0">none</option>
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                </select>
            <button class="button">Add to Cart</button>
            <div>
              <h4 class="returns"> Free Returns</h4>
              <p class="return-text">30-day free returns on all products. Limited time offer. See terms &amp; conditions.</p>
            </div>
          </div>
        </div>

      </section>
      <section id="sec2">
        <h3>Overview</h3>
        <div class="flex-container overview-container">
          <div class="flex-item flex-center">
            <p class="overview-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
              irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p class="overview-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
              irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
          </div>
        </div>
      </section>
      <section id="sec3">
        <h3>Tech Specs</h3>
        <div class="flex-container flex-space-between flex-spec-wrap-mobile">
          <div class="flex-item flex-start">
            <div class="spec-grid-container">
              <div>Material</div>
              <div>synthetic</div>
              <div>Zip</div>
              <div>full-lengh</div>
              <div>Season</div>
              <div>spring, summer, fall</div>
              <div>Pockets</div>
              <div>3 rear, 2 side, 1 zippered rear</div>
              <div>Recommended Use</div>
              <div>road cycling</div>
            </div>
          </div>
          <div class="flex-item flex-end video-spec">
            <video controls="controls" id="video" preload="none" width="420">
                            <source src="https://dl5.webmfiles.org/big-buck-bunny_trailer.webm" type="video/webm"></video>
            <p><em> How to wear the Jersey</em></p>
          </div>
        </div>
      </section>
    </main>
    <footer>
      <div class="flex-container">
        <div class="flex-item flex-center email-container">
          <form class="form-signup" id="form" action="https://www.freecodecamp.org/email-submit">
            <div class="email-label-container">
              <p class="get-latest-label">Get the latest news &amp; promotions</p>
            </div>
            <div class="email-input-container">
              <input type="email" id="email" name="email" class="email-input" size="83" placeholder="Your Email Address" required>
              <input type="submit" value="Sign Up" id="submit" class="email-button">
            </div>
          </form>
        </div>
      </div>
      <nav class="flex-container">
        <ul class="nav flex-container  flex-item flex-center">
          <li><a class="nav-link" href="#sec1">Product</a></li>
          <li><a>Track Order</a></li>
          <li><a>My Account</a></li>
        </ul>
      </nav>
      <div class="flex-item flex-start">
        <span class="copyright"> &copy; TerrySmith.io  - All rights reserved.</span>
      </div>
    </footer>
  </div>
</body>

</html>
              
            
!

CSS

              
                :root {
  --nav-bg-color: #d2d2d2;
  --log-bg-color: #e4e4e4;
  --nav-footer-bg-color: var(--nav-bg-color);
  --nav-text-color: #363436;
  --buy-box-bg-color: #f5f6f8;
  --footer-bg-color: var(--log-bg-color);
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: "Open Sans", sans-serif;
  color: val(--nav-text-color);
  font-size: 1rem;
  font-weight: 400;
  line-height: 20px;
  box-sizing: border-box;
}

#container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.header-logo-container {
  padding-left: 35px;
  background-color: var(--log-bg-color);
}

.flex-container {
  display: flex;
}
.flex-item {
  flex: 1 1 auto;
}
.flex-start {
  justify-content: flex-start;
}
.flex-center {
  justify-content: center;
}
.flex-end {
  justify-content: flex-end;
}
.flex-wrap {
  flex-wrap: wrap;
}
.item-center {
  align-items: center;
}
.flex-column {
  flex-direction: column;
}
.flex-space-between {
  justify-content: space-between;
}
.flex-space-around {
  justify-content: space-around;
}

main {
  flex: 1;
  overflow: auto;
}

section {
  overflow: auto;
  border-bottom: 1px solid;
  padding-left: 30px;
  padding-right: 30px;
}

.overview-text {
  text-align: justify;
  margin: 0 auto;
  width: 60%;
  padding-bottom: 30px;
}

#header {
  background: var(--nav-bg-color);
}

.header-logo {
  padding-left: 20px;
  display: none;
}

.logo {
  height: 27px;
  display: inline-block;
  padding-top: 0px;
  vertical-align: top;
  margin-top: 15px;
  color: var(--nav-text-color);
}

.shop-cart {
  background-image: url(https://imgplaceholder.com/50x50/transparent/000000/fa-shopping-cart);
  height: 50px;
  width: 50px;
  background-repeat: no-repeat;
  display: inline-block;
  margin-right: 15px;
}

.nav {
  list-style: none;
  font-size: 1.2rem;
}
.nav a {
  text-decoration: none;
  display: block;
  padding: 0 1em;
  color: var(--nav-text-color);
}

.product-image {
  text-align: center;
  padding: 10px;
  margin: 20px 10px;
}

.product-buy-box {
  padding: 0 20px 25px;
  min-height: 450px;
  max-width: 314px;
  width: 40%;
  margin: 25px 25px;
  background-color: var(--buy-box-bg-color);
}

.brand {
  display: block;
  color: #333;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-name {
  color: #333;
  display: block;
  font-size: 32px;
  font-weight: 200;
  line-height: 30px;
  padding-bottom: 10px;
}

.product-bar {
  background-color: #c00;
  height: 5px;
  margin-bottom: 15px;
  width: 75px;
}

.size-range {
  margin: 25px 0px 10px;
}

.size-button {
  display: inline-block;
  margin: 0.6rem 0.6rem 0 0;
  border: 1px solid #242424;
  font-size: 0.9375rem;
  padding: 0.25rem 0.75rem;
  color: #242424;
  text-decoration: none;
  line-height: 1.25rem;
  white-space: nowrap;
  border-radius: 0.1875rem;
  transition: all 0.3s ease-out;
  transition-property: background-color, color, border-color;
  overflow: hidden;
  position: relative;
  background-color: #fff;
}

.size-button.selected,
.size-button:hover {
  background-color: #0f7fd7;
  color: #fff;
  border-color: #0f7fd7;
}

#dropdown {
  padding: 6px;
  margin: 5px;
  border-radius: 4px;
  background: #ffffff;
  color: #242424;
  border: 1px solid #242424;
  outline: none;
  display: inline-block;
  cursor: pointer;
  width: 60px;
  height: 2.5rem;
}

img {
  max-width: 60%;
}

.dropdown-label {
  margin: 25px 0px 10px;
}

.button {
  margin-left: 15px;
  font-weight: 400;
  border-radius: 3px;
  padding: 0 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1;
  width: 60%;
  transition-duration: 0.2s;
  background-color: #0f7fd7;
  cusor:pointer;
  color: #fff;
  font-size: 1rem;
  border: none;
  height: 2.5rem;
}

.email-container {
  text-align: center;
  width: 300px;
  background-color: var(--footer-bg-color);
  padding: 0px 0px 15px;
}

.email-input {
  box-sizing: border-box;
  height: 38px;
  line-height: 33px;
  width: 20%;
  border-radius: 2px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  padding: 0.325em 0.75rem;
  text-indent: 0;
}

.email-button {
  box-sizing: border-box;
  background-color: #333;
  border: none;
  color: #fff;
  height: 39px;
  line-height: 33px;
  margin-bottom: 0;
  margin-left: -5px;
  font-size: 0.8rem;
  width: 10%;
  white-space: nowrap;
  top: 0px;
}

.returns {
  color: #cc0000;
  font-size: 24px;
  font-weight: normal;
  font-family: "ProximaNova", Arial, sans-serif;
  margin-bottom: 0px;
  text-transform: uppercase;
}

.return-text {
  font-size: 0.8rem;
  font-weight: normal;
  font-family: "ProximaNova", Arial, sans-serif;
  margin-top: 5px;
}

.spec-grid-container {
  display: grid;
  grid-template-columns: auto auto;
  padding: 0px;
  margin-bottom: 15px;
  font-size: 1rem;
}

.spec-grid-container > div {
  text-align: left;
  padding: 20px;
  border-bottom: 1px solid #333;
}

.spec-grid-container > div:nth-child(odd) {
  text-align: justify;
  border-right: 1px solid #333;
}

.video-spec {
  padding: 10px;
  text-align: center;
}

#video {
  width: 420px;
}

section:last-child {
  border: none;
  margin-bottom: 15px;
}

footer {
  background-color: var(--footer-bg-color);
}
footer nav {
  background-color: var(--nav-footer-bg-color);
}
.copyright {
  font-size: 10px;
  padding: 10px;
}

/* Portrait and Landscape 6,7,8*/
@media only screen and (min-device-width: 320px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3) {
  body,
  .nav {
    font-size: 0.8rem;
  }

  img {
    max-width: 100%;
  }

  .flex-spec-wrap-mobile {
    flex-wrap: wrap;
    flex-direction: column;
  }
  .productflex {
    flex-direction: column;
    align-items: center;
  }

  .overview-text,
  .product-buy-box {
    width: 100%;
  }
  .spec-grid-container {
    grid-template-columns: auto auto;
    font-size: 0.7rem;
  }

  .email-input {
    width: 35%;
  }

  .email-button {
    width: 22%;
  }

  #video {
    width: 100%;
  }
}
/* Portrait and Landscape x*/
@media only screen and (min-device-width: 320px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2) {
  body,
  .nav {
    font-size: 0.8rem;
  }

  img {
    max-width: 100%;
  }

  .nav a {
    white-space: normal;
  }

  .flex-spec-wrap-mobile {
    flex-wrap: wrap;
    flex-direction: column;
  }

  .productflex {
    flex-direction: column;
    align-items: center;
  }
  .overview-text,
  .product-buy-box {
    width: 100%;
  }
  .spec-grid-container {
    grid-template-columns: auto auto;
    font-size: 0.7rem;
  }

  .email-button {
    width: 22%;
  }

  .email-input {
    width: 35%;
  }

  #video {
    width: 100%;
  }
}

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) {
  .nav {
    padding-right: 5%;
  }
  .spec-grid-container {
    grid-template-columns: auto auto;
    font-size: 0.7rem;
  }

  .flex-spec-wrap-mobile {
    flex-wrap: wrap;
  }

  img {
    max-width: 120%;
  }
  .product-buy-box {
    width: 100%;
  }
}

/* hirez Portrait and Landscape tablets */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 3) {
  .nav {
    padding-right: 5%;
  }
  .spec-grid-container {
    grid-template-columns: auto auto;
    font-size: 0.7rem;
  }
  .flex-spec-wrap-mobile {
    flex-wrap: wrap;
  }

  img {
    max-width: 120%;
  }

  .product-buy-box {
    width: 100%;
  }
}

              
            
!

JS

              
                

              
            
!
999px

Console