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

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

  <header id="header">
    <div class="logo">
      <img id="header-img" src="https://image.flaticon.com/icons/png/512/53/53775.png" alt="icon of 2 leaves"/>
    </div>
    <h1 id="title">Organic Kitchen</h1>
    <label for="toggle">&#9776;</label>
    <input type="checkbox" id="toggle"/>
    <nav id="nav-bar">
      <ul>
        <li><a href="#home" class="nav-link"> Home</a></li>
        <li><a href="#about" class="nav-link"> About</a></li>
        <li><a href="#shop" class="nav-link"> Shop</a></li>
        <li><a href="#contact" class="nav-link"> Contact</a></li>
      </ul>
    </nav>
  </header>

<div id="container">
  
<section id="home">
  <div class="home-area">
    <img id="home-img" src="https://previews.dropbox.com/p/thumb/AA6gU7vnCgMr39PMcFGtLjQ6C7NJm4E6DC16YZFDU-T9qlnFdDbEzxb1kI2FruJf-rlbOA_plxrahoznoKOlX2nBDom8xKqCY7taiGHOLx322f0w2qirR_RItZP0TAiNPk_wCZSV1INbAId4VMST_wkmm4S8VYczUtqbGqLyAHbzYRan2mPIoDLkmeURgD68y1xixtzloUnihEad84rluSFYjvOuaeCEB99IVImdvYVu1LhLdti2BNg_xArsyEUP8_2NsEQybcOF37BEOiga2vMeGuMPsUC7ogUfHk80oX6YGF436URaHtUuAD5J1q1L8oveHB9Og7b1kQg2HemS1g2127Qg0_8zMRjPYGekeTCmWA/p.jpeg?fv_content=true&size_mode=5" width="900" alt="icon of 2 leaves"/>
    <div id="home-desc">
      <h2 id="home-desc-title">Organic Kitchen</h2>
      <h3 id="home-desc-sub">Meal Plans</h3>
      <div id="green-btn"><button id="home-desc-btn">View Our Shop</button></div>
    </div>
  </div>  
</section>
  
  <section id="contact">
    <h2 id="contact-title">Stay Updated</h2>
    <p id="contact-description">Get $15 off your first box. Subscribe Now!</p>
    <form id="form" action="https://www.freecodecamp.com/email-submit"> 
      <input id="email" name="email" type="email" placeholder="Enter your email address" required />
      <input id="submit" name="submit" type="submit" value="Subscribe" class="btn"/>
    </form> 
  </section>
  
  <section id="about">
    <div id=" left">
    <h2 id="about-title">Why us? </h2> 
    <ul id="about-list">
    <li class="about-desc"> Fresh and organic ingredients</li>
    <li class="about-desc">Largest recipe inventory</li> 
      <li class="about-desc">Family friendly</li>
      <li class="about-desc">Calorie smart</li>
    <li class="about-desc">Vegan, vegetarian, high protein, pescitarian options </li>
    </ul>
    </div>
    <div id="right">
    <iframe id="video" width="600" height="315" src="https://www.youtube.com/embed/K8954JI6TCA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    </div>
</section> 
  <h2 id="shop-title">Our Plans</h2>
<section id="shop">
  
    <div class="plan" id="veggie">
      <div class="plan-title">Veggie Delight</div> 
      <h3 class="price">$25.99</h3>
      <ol class="features">
        <li class="feature">From 2-4 people</li>
        <li class="feature">From 2-4 recipes a week</li>
        <li class="feature">Personalized Meal selection</li>
        <li class="feature">Organic vegetables</li> 
      </ol>
      <button class="select-btn">Select</button>
    </div> 
  
  <div class="plan" id="calorie-smart">
      <div class="plan-title">Calorie Smart</div> 
      <h3 class="price">$29.99</h3>
      <ol class="features">
        <li class="feature">From 2-4 people</li>
        <li class="feature">From 2-4 recipes a week</li>
        <li class="feature">Personalized Meal selection</li>
        <li class="feature">Organic vegetables & Protein</li> 
      </ol>
      <button class="select-btn">Select</button>
    </div>
    
    <div class="plan" id="meat-veggie">
      <div class="plan-title">Meat & Veggie</div> 
      <h3 class="price">$39.99</h3>
      <ol class="features">
        <li class="feature">From 2-4 people</li>
        <li class="feature">From 2-4 recipes a week</li>
        <li class="feature">Personalized Meal selection</li>
        <li class="feature">Organic vegetables & Protein</li> 
      </ol>
      <button class="select-btn">Select</button>
    </div>   
</section>
  <footer id="footer">
    <p>Organic Kitchen 2020</p>
  </footer> 
  
</div>
              
            
!

CSS

              
                /*font-family: 'Roboto Condensed', sans-serif;*/

@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400;0,700;1,400&display=swap');

* {
  box-sizing: border-box;
  margin: 0; 
  padding: 0;
}

html {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px; 
}

header { 
  display: flex; 
  background: white; 
  width: 100%; 
  justify-content: space-evenly;
  align-items: center;
  padding: 5px 10%;
  position: fixed; 
  top: 0; 
  z-index: 500;
}

#header-img {
  display: inline;
  width: 40px; 
}

#navbar {
  position: relative; 
  left: 50%; 
}

ul {
  list-style-type: none;
  float: right;
  margin: 0;
  padding: 0;
}

ul li {
  display: inline-block;
  padding: 0px 10px; 
}

li, a, button {
  text-decoration: none;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 400; 
  font-size 16px;
  color: #000;
}

label {
  margin: 0 40px 0 0; 
  font-size: 26px; 
  line-height: 70px; 
  display: none; 
}

#toggle {
  display: none; 
}

@media only screen and (max-width: 500px) {
  label {
    display: block; 
    cursor: pointer; 
  }
  #nav-bar {
    text-align: center; 
    width: 100%;
    display: none; 
  }
  #nav-bar a {
    display: block;
    margin: 0; 
  }
  #toggle:checked + #nav-bar {
    display: block; 
  }
}

#home-img {
  display: block; 
  margin-left: auto; 
  margin-right: auto;
  margin-top: 50px; 
  width: 100%;
}

#home-desc {
  position: absolute; 
  top: 15%; 
  left: 55%; 
}

#home-desc-title {
  font-size: 5rem;
  color: white; 
  text-shadow: 2px 2px 2px #333; 
}

#home-desc-sub {
  font-size: 3rem; 
  color: white; 
  text-shadow: 2px 2px 2px #333; 
  text-align: center; 
  margin-bottom: 10px; 
}

#home-desc-btn {
  background: #4f7942; 
  color: white;
  font-size: 1.6rem; 
  padding: 10px 50px;
  border-radius: 3px; 
  box-shadow: 2px 2px 2px #333; 
  position: relative; 
  left: 25%; 
}

#home-desc-btn:hover { 
  background: #446939;
}

@media only screen and (max-width: 500px) {
  #home-img {
    display: none;
  }
  #home-desc {
    position: absolute; 
    left: 25px; 
    top: 0; 
    left: 0; 
    padding: 35px;
    margin-top: 45px;
    margin-bottom: 80px;
    background: #00e2e2;
  }
  #home-desc-title {
    font-size: 3rem; 
    text-align: center; 
  }
  #home-desc-sub {
    font-size: 2rem;
  }
  #home-desc-btn {
    font-size: 1rem;
    left: 20%; 
  }
}

#contact {
  display: block; 
  text-align: center; 
  line-height: 45px; 
  margin-top: 50px; 
  margin-bottom: 50px; 
}

#contact-title { 
  font-size: 2.6rem; 
}

#contact-description {
  font-size: 1.5rem; 
}

#email {
  padding: 10px 20px; 
  border-radius: 3px; 
}

#submit {
  background: #4f7942; 
  color: white;
  font-size: 1rem; 
  padding: 10px 50px;
  border-radius: 3px; 
  box-shadow: 2px 2px 2px #333; 
}

#submit:hover { 
  background: #446939;
}

@media only screen and (max-width: 500px) {
  #contact {
    margin-top: 250px; 
  }
  #contact-title {
    font-size: 2rem;
  }
  
  #contact-description {
    font-size: 1rem;
  }
  
  #email {
    display: block;
    margin: auto;
  }
  
  #submit {
    margin-top: 10px;
  }
}

#about {
  background: #f0edea;
  padding: 40px 0; 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  grid-column-gap: 30px; 
  justify-items: start; 
}

#video { 
  display: block; 
}

#about-title {
  font-size: 2.5rem; 
  text-align: center; 
  margin-bottom: 20px; 
}

.about-desc {
  display: block; 
  font-size: 1.5rem;
  font-weight: 400; 
  line-height: 30px; 
  margin-left: 30px;  
}

@media only screen and (max-width: 500px) {
  #about {
  grid-template-columns: 1fr; 
  grid-gap: 30px; 
  }
  
  #video {
    max-width: 100%;
  }
  
  #about-title {
    font-size: 2rem;
    text-align: left; 
    margin-left: 35px;
  }
  
  #about-desc {
    font-size: 1rem;
  }
}

#shop-title {
  font-size: 2.6rem;
  text-align: center; 
  margin-top: 30px; 
}

#shop {
  padding: 40px 0; 
  display: grid; 
  grid-template-columns: 1fr 1fr 1fr; 
  grid-column-gap: 30px; 
  justify-items: center; 
}

.plan {
  border: 2px solid black;
  border-radius: 5px; 
  box-shadow: 2px 2px 2px #333; 
  padding: 40px; 
  text-align: center; 
  line-height: 30px; 
}

.plan-title { 
  font-size: 2.4rem; 
  line-height: 43px; 
  margin: 10px 10px; 
}

.price {
  font-size: 1.8rem;
  margin: 20px 0; 
}

.feature {
  list-style-type: none; 
  font-size: 1.2rem;
}

.select-btn {
  background: #4f7942; 
  color: white;
  font-size: 1.2rem; 
  margin-top: 20px; 
  padding: 10px 50px;
  border-radius: 3px; 
  box-shadow: 2px 2px 2px #333; 
}

#footer {
  background: gray; 
  color: white; 
  padding: 20px;
}

@media (min-width: 300px) {
  #shop {
    grid-template-columns: 1fr;
    grid-gap: 10px; 
  }
}


@media (min-width: 400px) {
  #shop {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
              
            
!

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