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 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

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

              
                <!-- Coded as a project for the Responsive Web Design course at FreeCodeCamp. Initial structure inspired by the FCC example Product Landing Page, coded by @atjonathan. -->

<link href="https://fonts.googleapis.com/css2?family=Pacifico&display=swap" rel="stylesheet">

<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
      rel="stylesheet">

<header id="header">
 <div class="container">
    <img id="header-img" src="https://upload.wikimedia.org/wikipedia/commons/3/30/Banjo_%28PSF%29.png"
         alt="banjo company logo"
         </img>
  <div id="logo-text">
    <a id="logo-link" href="#"><h1 id="banjo-heading">Banjo & Friends</h1></a>
  </div>
<div id="navigation">
  <nav id="nav-bar">
    <ul>
      <li><a class="nav-link" href="#about">About</a></li>
      <li><a class="nav-link" href="#examples">Examples</a></li>
      <li><a class="nav-link" href="#contact">Contact</a></li>
    </ul>
    </div>
  </div>
    </header>

<div>
  
<section class="email-area">
  <h2>Get the best banjo stuff right to your inbox!</h2>
  <form id="form" action="https://www.freecodecamp.com/email-submit">
    <input 
        name="email"
        id="email"
        type="email"
        placeholder="Enter your email address"
        required
      />
    
    <input id="submit" type="submit" value="Sign me up!" class="btn"/>
  </form>
  </section>
  </div>
  
  <section id="about">
   <div class="container">
     <div class="grid">
       <div class="icon">
         <i class="material-icons md-48">grade</i>
        </div>
              <div class="description">
                <div class="info-title">
                  <strong>Only the Best</strong></div>
               We take pride in sourcing only the highest quality banjos and old time instruments, backing everything we sell with a 100% satisfaction guarantee!
      </div>
    </div>
      
  <div class="grid">
          <div class="icon">
            <i class="material-icons md-48">local_shipping</i>
          </div>
            <div class="description">
               <div class="info-title">
                 <strong>Fast Shipping</strong></div>
          We offer fast and safe shipping worldwide!
     </div>
  </div>
      
  <div class="grid">
          <div class="icon">
          <i class="material-icons md-48">check</i>
          </div>
            <div class="description">
               <div class="info-title">
                 <strong>Quality Checked</strong></div>
          All of our products go through a rigorous quality assurance process, ensuring you get the best possible quality instrument delivered to your door.
     </div>
   </div>
 </div>
</section>
    
        <br>
    <section id="examples">
          <p>Check out some killer old-time music!</p>
      <iframe 
              id="video"
              height="315" src="https://www.youtube.com/embed/t2L4XyEF7hw" frameborder="0" allowfullscreen></iframe>
    </section>
    <br>
    <section id="contact">
      <div class="cont">
        <p>Get in touch today!
        <br>
          Please email, call, or visit.
          <br>
          lorem ipsum, lorem ipsum.
      </p>
   </div>
 </section>   
              
            
!

CSS

              
                /*Icon size options*/

.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }

/* Scroll styling */

html, body {
 scroll-behavior: smooth;
}

/* Header area */

#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

#header .container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  background-image: linear-gradient(180deg, thistle, white);
  width: 100%;
}

img {
  max-width: 125px;
  height: auto;
  border-style: solid;
  border-width: 1px;
  border-radius: 10px;
  box-shadow: 5px 5px darkgrey;
}

#logo-text {
  display: flex;
  font-size: 1.2rem; 
  padding-left: 15px;
  font-family: Pacifico, cursive;
}

#logo-text a {
  text-decoration: none;
  color: black;
}

@media (max-width: 400px) {
  #logo-text {
    padding-left: 50px; 
   }
}

/* Navigation */

#nav-bar {
  font-family: calibri, sans-serif;
  font-size: 1.1rem;
  font-weight: bold;
}

li a {
  color: black;
  padding: 5px;
  text-decoration: none;
  border-radius: 10px;
  transition-duration: 0.4s;
}

li a:hover {
  background-color: thistle;
}

#nav-bar ul {
  text-align: center;
}

#nav-bar li {
  display: inline;
}

/* Container styling */

.container {
  width: 85%;
  padding: 15px;
  margin: auto;
}

/* Email area */

.email-area {
  display: flex;
  flex-direction: column;
  padding-top: 250px;
  padding-bottom: 30px;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: calibri; sans-serif;
  font-size: 0.8rem;
}

.btn {
  background-color: thistle;
  height: 30px;
  font-size: 1em;
  font-weight: bold;
  text-transform: uppercase;
  border: 1px black solid;
  border-radius: 5px;
  cursor: pointer;
}

#email {
  width: 100%;
  height: 30px;
  margin-bottom: 15px;
  border-style: solid;
  border-width: 1px;
  border-color: black;
  border-radius: 5px;
  text-align: center;
}

/* Media rules for email area spacing on smaller screens */

@media (max-width: 600px) {
  .email-area {
    font-size: 0.7rem;
    margin-top: 50px;
  }
}

@media (max-width: 500px) {
  .email-area {
    margin-top: 250px;
  }
}

/* About area */

#about {
  padding-top: 140px;
}

.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  padding-left: 15px;
  color: orange;
}

.description {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 120px;
  width: 75vw;
  padding-left: 50px;
  line-height: 1.5;
  font-family: calibri, sans-serif;  
}

.info-title {
  font-size: 2rem;
}

.grid {
  display: flex;
}

@media (max-width: 650px) {
  #about .description {
    height: 300px;   
    margin-top: 0;
    padding: 0px;
  }
}

/* Video area */

#examples {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 125px;
  padding-bottom: 100px;
  align-items: center;
  justify-content: center;
  font-family: calibri; sans-serif;
  font-size: 1.2rem;
  line-height: 1.5;
}

#examples > iframe {
  max-width: 560px;
  width: 100%;
}

/* Contact area */

.cont {
  display: flex;
  flex-direction: column;
  padding-top: 50px;
  padding-bottom: 50px;
  margin-bottom: 100px;
  margin-left: 25px;
  margin-right: 25px;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: calibri; sans-serif;
  font-size: 2rem;
  border-style: solid;
  border-width: 2px;
  border-color: rgb(13,32,21);
  box-shadow: 5px 5px darkgrey;
  line-height: 1.5;
}
              
            
!

JS

              
                
              
            
!
999px

Console