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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

  <title>Farmer's Fresh Fair</title>
</head>

<body>

  <header id="header">

    <nav id="nav-bar" class="topnav">
      <a href="#home" class="active-page nav-link"><img src="https://images.vexels.com/media/users/3/127617/isolated/lists/0f38245986cb668175a17694711e5aba-farm-fresh-label-2-svg.png" id="header-img"></a>
      <a href="#mission" class="nav-link">Mission</a>
      <a href="#vendor" class="nav-link">Become A Vendor</a>
      <a href="#news" class="nav-link">Newsletter</a>
      <a href="#help" class="nav-link">Opportunities</a>
      <a href="javascript:void(0);" class="nav-icon" onclick="myFunction()"><i class="fa fa-bars"></i></a>
    </nav>
  </header>

  <div id="home" class="pimg1 container"> </div>
    <div class="ptext">
      <span class="border border-white">
        Farmer's Fresh Fair
      </span>
    </div>


  <section id="mission" class="section section-light">
    <h2>Our Mission</h2>
    <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Officia sequi reprehenderit aut eum saepe et similique doloremque, ipsa impedit cum, vel reiciendis cumque rerum ipsum maiores placeat quod unde obcaecati. Lorem ipsum dolor sit amet consectetur
      adipisicing elit. Nisi unde officiis autem beatae vitae dolore sed. Non earum, exercitationem fugit possimus sed maiores quis ratione sit. Voluptates ea perferendis obcaecati!</p>
  </section>

  <div class="container">
  <div class="pimg2"></div>
    <div class="ptext">
      <span class="border border-blue">
        Grown With Care
      </span>
    </div>
  </div>

  <section id="vendor" class="section section-dark">
    <h2>Become a Vendor</h2>
    <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Officia sequi reprehenderit aut eum saepe et similique doloremque, ipsa impedit cum, vel reiciendis cumque rerum ipsum maiores placeat quod unde obcaecati. Lorem ipsum dolor sit amet consectetur
      adipisicing elit. Nisi unde officiis autem beatae vitae dolore sed. Non earum, exercitationem fugit possimus sed maiores quis ratione sit. Voluptates ea perferendis obcaecati!</p>
  </section>

  <div class="container">
  <div class="pimg3"></div>
    <div class="ptext">
      <span class="border border-orange">
        For A Happier You
      </span>
    </div>
  </div>

  <section id="news" class="section section-dark">
    <h2>The Freshest Newsletter</h2>
    <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Officia sequi reprehenderit aut eum saepe et similique doloremque, ipsa impedit cum, vel reiciendis cumque rerum ipsum maiores placeat quod unde obcaecati.</p>
    <form action="https://www.freecodecamp.com/email-submit" id="form">
      <p id="news-text">Sign Up Today To Get The Freshest News!
        <p>
          <input type="email" id="email" name="email" placeholder="Enter Email Here">
          <input type="submit" id="submit">
    </form>
    
  </section>

  <div class="container">
  <div class="pimg4"></div>
    <div class="ptext">
      <span class="border border-green">
        For A Happier Planet
      </span>
    </div>
  </div>

  <section id="help" class="section section-light">
    <h2>Help a Local Farm</h2>
    <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Officia sequi reprehenderit aut eum saepe et similique doloremque, ipsa impedit cum, vel reiciendis cumque rerum ipsum maiores placeat quod unde obcaecati.</p>
    <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/cjRUB7lGhbI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  </section>

  <div class="container">
  <div class="pimg5"></div>
    <div class="ptext">
      <span class="border border-lilac">
        Welcome to the Fair
      </span>
    </div>
  </div>

</body>

<footer>
  <p class="pfooter">Fresh Farmers Fair
    <br> Address: 1234 Yummy Lane You City, STATE 12345
    <br> Contact Us: fffcontact@freshfarmers.com
  </p>
</footer>

</html>
              
            
!

CSS

              
                body {
  margin: 0;
  height: 100%;
  width: auto;
  position: none;
  font-family: Arial, Helvetica, sans-serif;
}

/*Logo*/
#header-img{
  display: inline;
  position: relative;
  text-align: center;
  height: auto;
  width: 100px;
  margin: 0;
  padding: 0;
  bottom: 33px;
  margin-bottom: -76px;
}

/*NavBar*/
.topnav {
  display: block;
  position: fixed;
  overflow: hidden;
  background-color: #333;
  z-index: 1;
  width: 100%;
  opacity: 0.85;
}

.topnav a {
  float: center;
  display: inline-block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
  margin-top: -7px;
}

.topnav a:hover {
  background-color: #ddd;
  color: black;
}

.active-page {
  background-color: #4caf50;
}

/*Hamburger When Small*/
.topnav .nav-icon {
  display: none;
}

/*Images n such*/
.pimg1{
  background-image: url('https://www.ncoa.org/wp-content/uploads/farmers-market.jpg');
  min-height: 100vh;
}

.pimg2{
  background-image: url('https://sustainablefoodtrust.org/wp-content/uploads/2013/04/New-Life-Farm_Cory-Bryk.jpg');
  min-height: 400px;
}

.pimg3{
  background-image: url('https://pbs.twimg.com/media/DrlccRMX4AAZXpW.jpg');
  min-height: 400px;
}

.pimg4{
  background-image: url('http://blog.katescarlata.com/wp-content/uploads/2012/06/Working-hard-planting1.jpg');
  min-height: 400px;
}

.pimg5{
  background-image: url('https://www.ferrybuildingmarketplace.com/wp-content/uploads/fb-farmers-market-2.jpg');
  min-height: 100vh;
}

.container{
  display: flex;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.pimg1, .pimg2, .pimg3, .pimg4, .pimg5{
  position: relative;
  width: 100%;
  opacity: 0.6;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/*Sections & Text*/
.section{
  text-align: center;
  padding: 50px 80px;
}

.section-light{
  background-color: #ddd;
  color: #000;
}

.section-dark{
  background-color: #282e34;
  color: #ddd;
}

.ptext{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: absolute;
  top: calc(50% - 20px);
  text-align: center;
  color: #000;
  font-size: 27px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}
  
.ptext .border{
  display: flex;
  flex-direction: column;
  background-color: #111;
  padding: 0.7em;
  opacity: 0.9;
}

.border-white{
  color: #fff;
  border: 2.5px dotted #ccccff;
}

.border-blue{
  color: #fff;
  border: 2.5px dotted #0099ff;
}

.border-orange{
  color: #fff;
  border: 2.5px dotted #ff471a;
}

.border-green{
  color: #fff;
  border: 2.5px dotted #00cc00;
}

.border-lilac{
  color: #fff;
  border: 2.5px dotted #cc6699;
}


/*Newsletter Area*/
#email{
  background-color: #ddd;
  color: #000;
  padding: 10px;
  border: 2px solid green;
  border-radius: 5px;
  width: 20%;
}

#submit{
  background-color: green;
  border: 2px solid green;
  border-radius: 5px;
  padding: 10px;
  width: 8em;
  font-family: Arial, sans-serif;
  font-weight: 600;
}

#submit:hover{
  background-color: #88ff4d;
}

/*For Video in Opportunities Section*/
#video{
  display: flex;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/*Footer*/
footer{
  padding: 5px;
  background-color: #111;
}

.pfooter{
  color: #fff;
  text-align: center;
}

@media screen and (max-width: 600px) {
  .topnav a:not(:first-child) {
    display: none;
  }
  .topnav a.nav-icon {
    float: right;
    display: block;
  }
  .topnav.responsive {
    position: relative;
  }
  .topnav.responsive .nav-icon {
    position: relative;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
  
  .pimg1, .pimg2, .pimg3, .pimg4, .pimg5{
    background-attachment: scroll;
  }
    .section{
    padding: 20px;
  }
  .ptext .border{
    padding: 0.5em;
    letter-spacing: 0.2em;
  }
  
  #email{
    width: 40%;
  }
}

              
            
!

JS

              
                /*Hamburger Nav*/
function myFunction() {
  var x = document.getElementById("nav-bar");
  if (x.className === "topnav") {
    x.className += " responsive";
  } else {
    x.className = "topnav";
  }
}

              
            
!
999px

Console