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>
<script src="https://use.fontawesome.com/0fabeb1766.js"></script>

<div class="main">
  <header id="header">
    <div id="logo">
      <img id="header-img" src="https://s3.amazonaws.com/freecodecamp/original_trombones.png" alt="original trombones logo" />
    </div>
    <nav id="nav-bar">
      <ul>
        <li><a class="nav-link" href="#features">Features</a></li>
        <li><a class="nav-link" href="#how-it-works">How it Works</a></li>
        <li><a class="nav-link" href="#pricing">Pricing</a></li>
    </nav>
  </header>
  <section class="form">
    <h2>Handcrafted, home-made masterpieces</h2>
    <form id="form" action="https://www.freecodecamp.com/email-submit">
      <input type="email" name="email" id="email" placeholder="Enter your email address" required></input>
      <input type="submit" id="submit" value="Get Started"></input>
    </form>
  </section>
  <section id="features">
    <div class="setting">
      <div class="icon">
        <i class="fa fa-3x fa-fire"></i>
      </div>
      <div class="content">
        <h2 class="no-margin">Premium Materials</h2>
        <p>Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase.</p>
      </div>
    </div>
    <div class="setting">
      <div class="icon">
        <i class="fa fa-3x fa-truck"></i>
      </div>
      <div class="content">
        <h2 class="no-margin">Fast Shipping</h2>
        <p>We make sure you recieve your trombone as soon as we have finished making it. We also provide free returns if you are not satisfied.</p>
      </div>
    </div>
    <div class="setting">
      <div class="icon">
        <i class="fa fa-3x fa-battery-full"></i>
      </div>
      <div class="content">
        <h2 class="no-margin">Quality Assurance</h2>
        <p>Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase.</p>
      </div>
    </div>
  </section>
  <section id="how-it-works">
    <iframe id="video" height="315" src="https://www.youtube-nocookie.com/embed/y8Yv4pnO7qc?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
  </section>
  <section id="pricing">
    <div class="section">
      <div class="flex">
        <h3 class="highlighted">Tenor Trombone</h3>
      </div>
      <h3 class="price">$600</h3>
      <ol>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum Dolor</li>
        <li>Lorem Ipsum</li>
      </ol>
      <div class="center">
        <button>Select</button>
      </div>
    </div>
    <div class="section">
      <div class="flex">
        <h3 class="highlighted">Bass Trombone</h3>
      </div>
      <h3 class="price">$900</h3>
      <ol>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum Dolor</li>
        <li>Lorem Ipsum</li>
      </ol>
      <div class="center">
        <button>Select</button>
      </div>
    </div>
    <div class="section">
      <div class="flex">
        <h3 class="highlighted">Valve Trombone</h3>
      </div>
      <h3 class="price">$1200</h3>
      <ol>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum</li>
        <li>Lorem Ipsum Dolor</li>
        <li>Lorem Ipsum</li>
      </ol>
      <div class="center">
        <button>Select</button>
      </div>
    </div>
  </section>
  <footer>
    <ul>
      <li><a href="#">Privacy</a></li>
      <li><a href="#">Terms</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
    <p>Copyright 2016, Original Trombones</p>
  </footer>
</div>
              
            
!

CSS

              
                @import "https://fonts.googleapis.com/css?family=Lato:400,700";

body {
  margin: 0;
  padding: 0;
  background-color: #eee;
  font-family: "Lato", sans-serif;
}

#header {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #eee;
  width: 100%;
  padding: 5px;
}

#logo img {
  width: 300px;
  padding: 10px;
}

#nav-bar {
  margin: 0;
  paddding: 0;
}

#nav-bar ul {
  list-style-type: none;
  display: flex;
  justify-content: space-around;
}

#nav-bar ul li a {
  color: inherit;
  text-decoration: none;
}

.form {
  margin-top: 3.5em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
#email {
  width: 250px;
  height: 1.5rem;
  margin-bottom: 10px;
}

#submit {
  margin-top: 3px;
  background: orange;
  padding: 8px 25px;
  border-radius: 5px;
  border: none;
  text-transform: uppercase;
  font-weight: bold;
}

#features {
  display: grid;
  justify-content: center;
  width: 65%;
  margin: 0 auto;
}

.setting {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-top: 3rem;
}

.icon {
  color: orange;
  margin: 0 50px;
}

.no-margin {
  margin-bottom: -10px;
}

#how-it-works {
  width: 100vw;
  display: flex;
  justify-content: center;
  margin: 3em 0;
}

#video {
  width: 40%;
}

#pricing {
  display: flex;
  max-width: 60%;
  margin: 0 auto;
  justify-content: space-evenly;
}

.section {
  margin: 4em 1rem;
  min-width: 35%;
  border: 1px solid rgba(0, 0, 0, 0.8);
}

.flex {
  display: flex;
  justify-content: center;
  align-items: center;
  background: lightgrey;
  text-transform: uppercase;
}

.price {
  text-align: center;
}

.section ol li {
  list-style-type: none;
  text-align: center;
  margin-top: 0.5em;
  margin-left: -2.5em;
}

.section .center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.section .center button {
  border: 0;
  border-radius: 0;
  text-transform: uppercase;
  background: orange;
  padding: 0.9em 1.5em;
  margin: 1em;
}

footer {
  padding: 0.8rem;
  margin: 0 4rem;
  background-color: lightgrey;
}

footer ul {
  list-style-type: none;
  display: flex;
  justify-content: end;
}

footer ul li a {
  color: inherit;
  text-decoration: none;
  margin: 0 1em;
}

footer p {
  text-align: right;
  margin-top: -0.5em;
  color: grey;
}

@media only screen and (max-width: 380px) {
  #header {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #nav-bar ul {
    display: flex;
    flex-direction: column;
    text-align: center;
  }

  .form {
    margin-top: 10em;
  }
  .form h2 {
    text-align: center;
  }

  #how-it-works iframe {
    width: 100%;
  }

  #pricing {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .section {
    width: 80vw;
  }

  .setting {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 98vw;
  }

  .content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  footer {
    margin: 0;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console