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">
    
    <!--Navigation bar-->
    <nav id="nav-bar">
      <img id="header-img" src="https://cdn.worldvectorlogo.com/logos/mcdonalds-3.svg" alt="logo">
      <ul class="menu">
        <li class="css-li"><a class="nav-link" href="#container-video">McDelivery</a></li>
        <li class="css-li"><a class="nav-link" href="#form">order now!</a>          
        </li>
        <li class="css-li"><a class="nav-link" href="#promotions">promotions</a></li>      
      </ul>
    </nav>
    </header>
 
 <!--Video-->   
  <section>
    <div id="container-video">
    
       <iframe
        id="video"
        height="500"
        src=" https://www.youtube-nocookie.com/embed/Un0hIp1Odrs"
        allowfullscreen
      ></iframe>
     
    </div>
  </section>

<!--Grid choose products-->

<section>
  <h1 id="order-now">Order Now!</h1>
  
<div class="grid-container">
  <div class="photo-1">
    <img class="img-product" src="https://mcdonalds.com.au/sites/mcdonalds.com.au/files/Product-Details-BigMac-mobile-201904.jpg" alt="">
  </div>
  <div class="photo-2">
    <img class="img-product" src="https://mcdonalds.com.au/sites/mcdonalds.com.au/files/Product-Details-Quarter-Pounder-Double-mobile-201904.jpg" alt="">
    </div>
  <div class="photo-3">
    <img class="img-product" src="https://mcdonalds.com.au/sites/mcdonalds.com.au/files/Product-Details-GC-Classic-Angus-mobile-201803.jpg" alt="">
    </div>
  <div class="name-1">
    <input
           type="number"
           class="name-product"
           name="Big Mac"
           min="1"
           max="100"> <p class="select-text">Big Mac</p>
      
     </div>
  <div class="name-2">
    <input 
           class="name-product"
           name="Double Quarter Pounder"
           type="number"
           min="1"
           max="100"><p class="select-text"> Double Quarter Pounder</p>
     </div>

  <div class="name-3">
    <input class="name-product"
           type="number"
           name="Classic Angus"
           min="1"
           max="100"><p class="select-text"> Classic Angus </p> </div>
 
</div>
</section>

<!--Form-->
<section>
  <div id="container-form">
  <form id="form" action="https://www.freecodecamp.com/email-submit">
   
      <input
        type="text"
        name="name"
        class="position"
        placeholder="Name"
        required
      />
    
      <input
        id="email"
        type="email"
        name="email"
        class="position"
        placeholder="Email"
        required
      />
    
    
      <input
        type="text"
        name="adress"
        class="position"
        placeholder="Adress"
        required
      />
   
      <input
        type="tel"
        name="phone"
        class="position"
        placeholder="Phone Number"
        required
      />
    
    <input id="submit" type="submit" value="ORDER"/>
  </form>
  </div>
</section>

<section>
  <p class="title-2"> Promotions </p>
  
  <div class="grid-promo">
    
  <div class="promo-1">
    <img class="img-promo" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/Mastercard-logo.svg/1200px-Mastercard-logo.svg.png" alt="">
    </div>
  <div class="promo-2">
    <img class="img-promo" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/American_Express_logo_%282018%29.svg/1200px-American_Express_logo_%282018%29.svg.png"  alt="">
    </div>
  <div class="promo-3">
    <img class="img-promo" src="https://upload.wikimedia.org/wikipedia/commons/1/16/Former_Visa_%28company%29_logo.svg" alt="">
    </div>
  
    <div id="promotions" class="text-promo1"><span class="text-promo">10% off using your Mastercard credit card.</span></div>
  <div class="text-promo2"><span class="text-promo">20% off using your AMEX credit card.</span></div>
  <div class="text-promo3"><span class="text-promo">15% off using your Visa credit card.</span></div>
</div>  
</section>  
 
<footer>
  <ul>
        <li><a href="#">privacy</a></li>
        <li><a href="#">terms</a></li>
        <li><a href="#">contact</a></li>
      </ul>
      <span class="text-footer">© 2017 - 2020 McDonald's. All Rights Reserved</span>
</footer>

              
            
!

CSS

              
                body{
  overflow-x:hidden;
  margin:0;
  background-color:black;
}
/*Navigation Bar*/
#nav-bar{
  position:fixed;
  z-index:9999;
  display:flex;
  width:100%;
  height: auto;
  justify-content:space-between;
  background: linear-gradient(90deg, rgba(212,42,29,1) 0%, rgba(212,42,29,1) 50%, rgba(252,199,46,1) 100%);
  box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.75);  
}
#header-img{
  width:5%;
  margin-top:1em;
  margin-bottom:0.9em;
  margin-left:1em;
}

.menu{
  margin-right:1em;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  color:white;
  display:flex;
  flex-flow:row nowrap;
  align-self:flex-end;
  margin-bottom:1em;
 
}

.nav-link{
  color:inherit;
  text-decoration: none !important;
  font-weight: bold;
  font-size:1.2em;
  margin:2em; 
 
}

ul {
    list-style-type: none;
}

.css-li{
  background-color:transparent;
  padding:0.4em; 
}

.css-li:hover{
  border-bottom-style: solid;
  border-color:#fcc72e;
  border-radius:1px;
}

/*Video*/
#container-video{
  display:flex;
  padding-top:7em;
  justify-content:center;
  width:100%;
}
#video{
  width:100%;
}
h1{
  font-family: 'Lato', sans-serif;
  font-weight:bolder;
  font-size: 2.5em;
  text-align: center;
  color: white;
  
}

.grid-container {
  margin-right:15em;
  margin-left:15em;
  margin-bottom:2em;
  margin-top:2em;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 20%;
  gap: 5px 20px;
  grid-template-areas: "photo-1 photo-2 photo-3" "name-1 name-2 name-3";
  align-items:center !important;
  
}
.img-product{
  width:100%;
  border-radius:10px;
}

.name-product{
  font-family: 'Lato', sans-serif;
  color:white;
  font-weight: bold;
  background-color:black;
  text-decoration: none !important;
  padding:1em;
  
 
  
 
}


.select-text{
  color:white;
  font-family:'Lato', sans-serif;
  cursor:pointer;

}

.select-text:hover{
  color:rgba(252,199,46,1);
}


.photo-1 {
  grid-area: photo-1;
  border-style: solid;
  border-color:white;
  border-radius:10px;
}

.photo-2 { 
  grid-area: photo-2;  
  border-style: solid;
  border-color:white;
  border-radius:10px; 
}

.photo-3 { grid-area: photo-3;  
  border-style: solid;
  border-color:white;
  border-radius:10px; 
  
}

.name-1 { 
  grid-area: name-1;
  text-align:center;
  border-style: solid;
  border-color:white;
  border-radius:5px;
  margin-top:0.5em;
  display: flex;
  flex-flow: column nowrap;

}

.name-2{
  grid-area: name-2;
  text-align:center;
  border-style: solid;
  border-color:white; 
  border-radius:5px;
  margin-top:0.5em;
  display: flex;
  flex-flow: column nowrap;
}

.name-3 { 
  grid-area: name-3;
  text-align:center;
  border-style: solid;
  border-color:white;
  border-radius:5px;
  margin-top:0.5em;
  display: flex;
  flex-flow: column nowrap;
}

button{
  border-style:none !important;
  width:100%;
}
iframe {
border: 0;
}



/*Form to delivery*/
#form{
  width:100%;
  height:auto; 
  display:flex;
  flex-flow:column wrap;
  margin-top:5em;
  
  
  
}

.position{
  width:50%;
  align-self:center;
  background-color:black; 
  color:white;
  padding:1em;
  border-style:solid;
  border-color:white; 
  border-radius:5px; 
  margin:1em;
  
 
}
::placeholder{
  color:white;
  font-family: 'Lato', sans-serif;
  font-size:1em;
  font-weight: light; 
  padding:1em;
  
}



.position:focus{
  outline:none;
 
}

#submit{
  width:56%;
  align-self:center;
  padding:1em;
  margin:1em;
  font-family:'Lato', sans-serif;
  font-weight:bolder;
  font-size:1.2em;
  border-radius:10px;
  background-color: rgba(252,199,46,1);
  border-style:none !important;
}

#submit:hover{
  background-color: rgba(212,42,29,1);
  cursor:pointer;
}

#submit:focus{
  outline:none !important;
}

/*Promotions */

.title-2{
  font-family: 'Lato', sans-serif;
  font-weight:bolder;
  font-size: 2.5em;
  text-align: center;
  color: white;
  
}

.grid-promo {
  padding:2em;
  margin-left:25em;
  margin-right:25em;
  margin-bottom:2em;
  margin-top:2em;
  align-items:center !important; 
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 1px 20px;
  grid-template-areas: "promo-1 text-promo1" "promo-2 text-promo2" "promo-3 text-promo3";
  border-style:solid;
  border-color:white;
}

.text-promo{
  font-family: 'Lato', sans-serif;
  color:white;
  font-weight: medium;
  background-color:black;
  margin-bottom:1em;
}


.promo-1 { grid-area: promo-1; }

.promo-2 { grid-area: promo-2; }

.promo-3 { grid-area: promo-3; }



.text-promo1 { grid-area: text-promo1; }

.text-promo2 { grid-area: text-promo2; }

.text-promo3 { grid-area: text-promo3; }

/*footer*/

footer{
  background: linear-gradient(90deg, rgba(212,42,29,1) 0%, rgba(212,42,29,1) 50%, rgba(252,199,46,1) 100%);
  width:100%;
  display:flex;
  flex-flow:column wrap;
  
}

footer > ul {
  display: flex;
  justify-content: center;
   
  
}

footer > ul > li {
  padding: 1em;
  margin-bottom:0;
  align-self:center;
   
}

a{
   text-decoration: none !important;
  color:white;
  font-weight:bold; 
  font-family:'Lato', sans-serif;
}

.text-footer{
  
  display: flex;
  justify-content:flex-end;
  font-size: 0.9em;
  color:black;
  font-weight:light;
  font-family:'Lato', sans-serif;
  margin-top:0;
}
.img-promo{
  width:10vw;
}

/* Responsive media queries for tablet and mobile*/
@media screen and (max-width: 1024px){
  #nav-bar{
    display:flex;
    flex-flow: column wrap;
    
  }
  #header-img{
    width:10%;
    align-self:center;
    margin-top:1em;
    margin-bottom:0.5em;
  }
  
  .menu{
    align-self:center;
    text-align:center;
    flex-flow: column wrap;
    margin-top:0;
    
  }
  .css-li{
    margin: 0;
    
  }
  #container-video{
    padding-top:45vmin;
    width:100%;
  }
  
  #video{
    width:100vw;
    height:60vw;
  }
  
  .nav-link{
    font-size:1em;
  }
  
  .grid-container{
    margin:2em;
  }
  
  .grid-promo{
    margin:5em;
    margin-top:2em;
    
   
  }
  
  .img-promo{
    max-width:15vw;
  }
  
  
}



              
            
!

JS

              
                
              
            
!
999px

Console