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

              
                <head>
  <script src="https://kit.fontawesome.com/a7d8db710a.js"></script>
   <link href="https://fonts.googleapis.com/css?family=Lato:400,700,900&display=swap" rel="stylesheet">
</head>
<body id="body">
  <header id="header">
    <img src="https://s3.amazonaws.com/freecodecamp/original_trombones.png" id="header-img">
    <nav id="nav-bar">
      <ul>
        <li><a href="#features" class="nav-link">Features</a></li>
        <li><a href="#products" class="nav-link">How it works</a></li>
        <li><a href="#pricing" class="nav-link">Pricing</a></li>
      </ul>
    </nav>
  </header>

  <div id="container">
    
    <div id="get-started">
      <h2 class="title">Handcrafted, home-made masterpieces</h2>
      <form action="https://www.freecodecamp.org/email-submit">
        <input id="email-input" type="email" placeholder="Enter your email address"><br>
        <input id="submit-email" type="submit" value="Get started!" name="submit">
      </form>
    </div>
    
    <div id="features">
      <i class="icon fas fa-fire fa-3x"></i>
      <div>
      <h2 class="title">Premium Materials</h2>
      <p>Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase.</p>
      </div>
      <i class="icon fas fa-truck fa-3x"></i>
      <div>
      <h2 class="title">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>
      <i class="icon fas fa-battery-full fa-3x"></i>
      <div>
      <h2 class="title">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 pitch of your instrument.</p>
      </div>
    </div>
    
    <div id="products">
      <h2 class="title">How it works</h2>
      <p>This is what you could do with one of our trombones!</p>
      <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>
    </div>
    
    <div id="pricing">
      <h2 class="title">Pricing</h2>
      <div id="price-grid">
        <div class="grid-item">
          <h3>Tenor trombone</h3>
          <p class="price">$600</p>
          <p>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.</p>
          <button class="select-item">Select</button>
        </div>
        <div class="grid-item">
          <h3>Bass trombone</h3>
          <p class="price">$900</p>
          <p>Bacon ipsum dolor amet burgdoggen alcatra buffalo, meatball shank kevin shankle venison filet mignon leberkas. Ribeye tri-tip kevin sirloin burgdoggen doner beef ribs ball tip pork loin. Filet mignon swine picanha turducken capicola.</p>
          <button class="select-item">Select</button>
        </div>
        <div class="grid-item">
          <h3>Valve trombone</h3>
          <p class="price">$1200</p>
          <p>Lorem ipsum dolor amet lomo try-hard bespoke, pop-up locavore poutine wayfarers portland tbh helvetica. Squid godard before they sold out vexillologist sustainable slow-carb man braid hella pop-up messenger bag crucifix vice marfa tumblr. </p>
          <button class="select-item">Select</button>
        </div>
      </div>
    </div>
  </div>
  <footer id="footer">
      <ul>
        <li><a class="footer-link" href=""#>Privacy</a></li>
        <li><a class="footer-link" href=""#>Terms</a></li>
        <li><a class="footer-link" href=""#>Contact</a></li>
      </ul>
    <p>Copyright 2019 <strong>&copy; Original Trombones</strong></p>
    </footer>
</body>
              
            
!

CSS

              
                html {
  box-sizing: border-box;  
  width: 100%;
  height: 100%;
}

*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
}

#body {
  font-family: Lato, sans-serif;
  font-size: 16px;
}

#header {
  width: 100%;
  height: 60px;
  background: #D8D8D8;
  display: flex;
  position: fixed;
  top: 0;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
}

#header-img {
  width: 300px;
  height: 30px;
}

#nav-bar {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
}

#nav-bar ul {
  margin-top: 15px;
  list-style-type: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding-bottom: 15px;
}

.nav-link {
  text-decoration: none;
  color: black;
  font-weight: bold;
  font-size: 18px;
  margin: 0 15px;
}

.nav-link:hover, .footer-link:hover {
  color: #f54f41;
}

#container {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.title {
  color: #f54f41;
  font-weight: 600;
}

#get-started, #features, #products, #pricing {
  margin: 25px 0;
}

#get-started {
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#email-input {
  width: 450px;
  height: 30px;
  margin-top: 5px;
  border: 1px solid #f54f41;
  border-radius: 5px;
  text-indent: 5px;
}

#submit-email {
  width: 180px;
  font-size: 18px;
  background: #f54f41;
  color: white;
  border: none;
  border-radius: 5px;
  margin: 8px;
  padding: 2px 10px;
}

#email-input:hover , #submit-email:hover {
  cursor: pointer;
  box-shadow: 2px 3px 5px #D8D8D8;
}

#email-input:hover {
    color: #f54f41;
}

#features {
  width: 800px;
  display: grid;
  grid-template-rows: repeat(1fr, 3);
  grid-template-columns: 10% 80%;
  grid-column-gap: 5px;
  align-items: center;
}

#features div {
  margin-bottom: 10px;
}

.icon {
  color: #f54f41;
}

#products {
  text-align: center;
}

iframe {
  margin-top: 10px;
}

#pricing h2 {
  text-align: center;
  margin-bottom: 8px;
}

#price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr;
  grid-column-gap: 20px;
}

.grid-item {
  padding: 10px;
  width: 250px;
  border: 1px solid #f54f41;
  border-radius: 5px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 0.3fr 0.3fr 2fr 0.3fr;
  justify-items: center;
}

.grid-item h5 {
  font-weight: bold;
}

.price {
  font-size: 20px;
  font-weight: 900;
  color: #f54f41;
}

.select-item {
  width: 80px;
  font-size: 18px;
  background: #f54f41;
  color: white;
  border: none;
  border-radius: 5px;
}

.select-item:hover {
  cursor: pointer;
  box-shadow: 2px 3px 5px #D8D8D8;
}

#footer {
  background: #D8D8D8;
  padding: 5px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#footer li {
  margin: 0 2px;
  list-style: none;
  display: inline;
  padding-left: 10px;
}

#footer p {
  margin: 0;
}

.footer-link {
  text-decoration: none;
  color: black;
  font-weight: bold;
}
              
            
!

JS

              
                
              
            
!
999px

Console