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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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>

<!DOCTYPE html>
<head>
  <title> Smoothies </title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Cabin+Condensed|Inconsolata|Shrikhand" rel="stylesheet">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
  <header id="header">
  <div id="logo">
  <h1> Fresh Smoothies </h1>
  <img id="header-img" src="https://media.giphy.com/media/xTiQytOEqr2U33lYkg/giphy.gif">
   </div>
   <ul>
  <nav id="nav-bar">
   <ol><a class="nav-link" href="#flavours"> Flavours </a></ol>
   <ol><a  class="nav-link" href="#about"> About </a></ol>
   <ol><a class="nav-link" href="#contact"> Contact </a> <ol>
   </nav>
   </ul>
   </header>
            <div id="about">
         <p> We are a fair trade organic smoothie company based in Brighton </p>
     
        <form id="form" action="https://www.freecodecamp.com/email-submit">
   <p class="tag"> Get weekly updates straight to your inbox </p>
   <input id="email" pattern="[^ @]*@[^ @]*" type="email" placeholder="enter your email" email="email" name="email" required/>
          <input id="submit" type="submit"> </input>
    </form>
    </div>
     <br>
      <content>
        <div id="section">
     <div id="flavours">
       <i class="large material-icons" >free_breakfast</i> <p> Freshly Made On Request </p>
      <i class="large material-icons">restaurant_menu </i> <p>Choose Your Own Flavours </p>
       <i class="large material-icons">nature </i> <p> Organic and From Sustainable Sources </p
     </div>
       </div>
          <div id="media">
  <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/dlcTpDZ21dY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
          </div>
          
          <div id="table">
  <div class="silver">
  <h2>Silver </h2>
    <p> One Smoothie P/Week </p>
    <p> £15 per month </p>
    </div>
    <div class="gold">
      <h2> Gold </h2>
      <p> Two Soothies P/Week </p>
      <p> £20 per month </P>
    </div>
    <div class="platinum">
      <h2> Platinum </h2>
        <p> Five Smoothies P/Week </P>
        <p> £50 per month </p>
          </div>
        </div>
        
       
  <footer id="contact">
    
<p> For More Information Contact <span>freshsmoothies@gmail.com </span></p>
        
        </footer>
  
         </content>
</body>

</html

              
            
!

CSS

              
                body {
  margin: 0;
  border: 0;
}

header {
 display: flex;
 height: 100%;
 justify-content: space-between;
  position: fixed;
  width: 100%;
  top:0;
  font-size: 1.5vw;
}


#logo {
  justify-content: flex-start;
  font-size: 1.5vw;
}

h1{
  padding-top: 20px;
  width: 50px;
  font-family: 'Shrikhand', cursive;
   font-size: 1.5vw;
}

#header-img {
  width: 20%;
  height: 90px;
  border-radius: 50%;
  padding: 20px;
  }

ul ol{
  display: inline-flex;
  font-size: 1.5vw;
  }

i{
  padding: 20px;
  font-size: 1.5vw;
}

#section {
  padding-right: 40px;
}

#section p{
  vertical-align: middle;
  margin-right: 9px;
  font-sieze: 1.5vw;
}

#section i{
  vetical-align: middle;
  height: 40%;
  float: left;
  padding-right: 40px;
}


a {
  font-size: 27px;
  font-family: 'Cabin Condensed', sans-serif;
  text-decoration: none;
  color: black;
}

#nav-bar {
    justify-content: flex-end;
    top: 0;
    width: 100%;
}

#nav-bar a:hover {
 color: blue;
}

#about {
  text-align: center;
}

#form {
  text-align: center;
  margin: 0 auto;
}

#email{
  width: 180px;
  height: 30px;
}

#submit {
  height:35px;
  background-color:#90C3D4;
}

content {
  display: flex;
  height: 300px;
  flex-direction: column;
  }

#section {
  align-self: center;
  font-size: 2vw;
}


p {
  font-size: 35px;
  font-family: 'Cabin Condensed', sans-serif
}

.tag {
  font-size: 20px;
}

#media {
  height: auto; 
  margin: 0 auto;
  max-width: 100%;
  text-align: center;
  padding: 30px;
}


#table {
  display: grid;
  max-width: 340px;
  padding: 30px;
  padding-left: 190px;
  justify-content: center;
  grid-template-columns: 150px 140px 160px;
  grid-column-gap: 65px;
}

.silver {
  background-color: skyblue;
  padding: 20px;
  width: 100%;
}

.gold {
  background-color: salmon;
  padding: 20px;
  width: 100%;
}

.platinum {
  background-color: lightgreen;
  padding: 20px;
  width: 100%;
}

h2{
  font-family:'Inconsolata', monospace;
  font-size: 30px;
}
span {
  font-family: 'Inconsolata', monospace;
  color:blue;
}

 footer p{
  font-size: 2.vw;
}

    
@media screen and (orientation: portrait) {
    #media {
      width: 100%;
      position: relative;
      height: auto;
        }
}
  @media screen and ( max-width: 700px) {
    #video {
      width: 100%;
      position: relative;
      height: auto;
      }
    footer { float: right;}
   }
  
  
  @media screen and ( max-width: 400px){
    
    ul, ol {
      height: auto;
      position: relative;
      width: 100%;
      text-align: center;
    }
    
    @media screen and ( max-width: 400px) {
      
    .silver, .gold, .platinum {
       width: 100%;
      }
  }
              
            
!

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