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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<!-- 

Hello Camper!

For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

- The freeCodeCamp Team 

-->
<div class="container">
  <header id="header">
    <div class="wrapper">
      <img id="header-img" src="https://s3.amazonaws.com/freecodecamp/original_trombones.png" alt="Original Trombones">

      <nav id="nav-bar">
        <ul>
          <li>
            <a class="nav-link" href="#feature">Features</a>
          </li>
          <li><a class="nav-link" href="#how-it-work">How It Works</a></li>
          <li><a class="nav-link" href="#price">Pricing</a></li>
        </ul>
      </nav>
    </div>
  </header>

  <section id="hero">
    <h1>Handcrafted, home-made masterpieces</h1>
    <form id="form" action="https://www.freecodecamp.com/email-submit">
      <div class="form-row">
        <input type="email" id="email" name="email" value="" placeholder="Please enter your Email">
      </div>
      <div class="form-row">
        <input type="submit" class="shadow" id="submit" value="Get Started">
      </div>
    </form>
  </section>
  <section id="feature">
    <div class="item">
      <div class="item-img">
        <i class="fa fa-fire"></i>
      </div>
      <div class="item-content">
        <h2 class="item-title">Premium Materials</h2>
        <p class="item-body">Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase.</p>
      </div>
    </div>

    <div class="item">
      <div class="item-img">
        <i class="fa fa-truck"></i>
      </div>
      <div class="item-content">
        <h2 class="item-title">Fast Shipping</h2>
        <p class="item-body">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="item">
      <div class="item-img">
        <i class="fa fa-battery-full"></i>
      </div>
      <div class="item-content">
        <h2 class="item-title">Quality Assurance</h2>
        <p class="item-body">For every purchase you make, we will ensure there are no damages or faults and we will check and test the pitch of your instrument.</p>
      </div>
    </div>
  </section>
  <section id="how-it-work">
    <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/y8Yv4pnO7qc" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  </section>
  <section id="price">
    <div class="box shadow">
      <div class="box-title">
        <h2>TENOR TROMBONE</h2>
      </div>
      <div class="box-body">
        <div class="price">$600</div>
        <p>Lorem ipsum.<br>Lorem ipsum.<br>Lorem ipsum dolor.<br>Lorem ipsum.</p>
        <button type="button">Select</button>
      </div>
    </div>

    <div class="box shadow">
      <div class="box-title">
        <h2>BASS TROMBONE</h2>
      </div>
      <div class="box-body">
        <div class="price">$900</div>
        <p>Lorem ipsum.<br>Lorem ipsum.<br>Lorem ipsum dolor.<br>Lorem ipsum.</p>
        <button type="button">Select</button>
      </div>
    </div>

    <div class="box shadow">
      <div class="box-title">
        <h2>VALVE TROMBONE</h2>
      </div>
      <div class="box-body">
        <div class="price">$1200</div>
        <p>Lorem ipsum.<br>Lorem ipsum.<br>Lorem ipsum dolor.<br>Lorem ipsum.</p>
        <button type="button">Select</button>
      </div>
    </div>
  </section>
  <footer id="footer">
    <ul id="footer-nav">
      <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

              
                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.container {
  color: #2d4036;
  line-height: 1.5;
  padding-top: 100px;
}
a {
  color: #2d4036;
}
a:hover {
  color: #db5d3a;
  text-decoration: none;
}
.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
.shadow:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
}
#header .wrapper {
  width: 1000px;
  margin: 0 auto;
  padding-top: 15px;
  padding-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#header-img {
  width: 30%;
}
#nav-bar ul {
  list-style: none;
}
#nav-bar ul li {
  display: inline;
}
.nav-link {
  margin-left: 10px;
  margin-right: 10px;
}

section {
  max-width: 1000px;
  margin: 0 auto 50px auto;
}

/* HERO */
#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#form {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.form-row {
  margin-bottom: 10px;
}
#email {
  border: 1px solid #eaecf2;
  padding: 10px;
  width: 200px;
}
#submit {
  background-color: #98c988;
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-size: 18px;
}

/* FEATURE */
.item {
  display: grid;
  grid-template-columns: 100px 1fr;
  margin-bottom: 30px;
}
.item .fa {
  color: #db5d3a;
  font-size: 48px;
}
.item-img {
  padding-top: 30px;
  text-align: center;
}

/* HOW IT WORKS */
#how-it-work {
  text-align: center;
}

/* PRICE */
#price {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
}
.box {
  text-align: center;
  border-radius: 10px;
  border-top: 6px solid #b0b9c6;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
.box:hover {
  border-top-color: #98c988;
}
.box-title h2 {
  font-size: 24px;
  font-weight: 600;
}
.box-body .price {
  font-size: 36px;
  font-weight: 700;
}
.box-body button {
  display: block;
  border: none;
  background-color: #98c988;
  font-size: 20px;
  padding: 10px 20px;
  text-transform: uppercase;
  margin-top: 20px;
  border-radius: 6px;
}

/* FOOTER */
#footer {
  background-color: #eaecf2;
  text-align: right;
  padding: 15px 20px;
}
#footer-nav li {
  display: inline-block;
  margin-left: 10px;
}

@media only screen and (max-width: 768px) {
  .container {
    padding-top: 0;
  }
  #header {
    position: relative;
    flex-direction: column;
    margin-bottom: 50px;
  }
  #header-img {
    margin-bottom: 20px;
  }
  
  #feature {
    padding-left: 20px;
    padding-right: 20px;
  }
  .item-img {
    grid-area: item-img;
  }
  .item-content {
    grid-area: item-content;
  }
  .item {
    grid-template-areas:
      "item-img item-img"
      "item-content item-content";
  }
  
  #price {
    display: block;
    padding-left: 20px;
    padding-right: 20px;
  }
  .box {
    margin-bottom: 20px;
  }
}

              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console