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

              
                <head>
  <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
      <main>
        <div id="back">
        <header id="header">
          <img id="header-img" src="https://p.kindpng.com/picc/s/17-170269_creative-web-designing-website-design-logo-png-transparent.png" alt="Bem Computers">
          <nav id="nav-bar">
            <ul>
              <li><a class="nav-link"href="#back">HOME</a></li>
               <li><a class="nav-link"href="#work">WORK</a></li>
               <li><a class="nav-link"href="#Deals">DEALS</a></li>
              <li><a class="log" href="#">Login</a></li>
            </ul>
          </nav>
          <nav id="navbar2">
            <ul>
              <li><a href="#back">HOME</a></li>
               <li><a href="#work">WORK</a></li>
               <li><a href="#Deals">DEALS</a></li>
              <li><a class="log" href="#">Login</a></li>
            </ul>
          </nav>
          <div id="menubtn">
            <i id="menu"class="fa fa-bars" aria-hidden="true"></i>
          </div>
        </header>
        <div class="showcase">
          <h1>Web Development Course</h1>
          <p>The only course you need to master web development</p>
        </div>
        <div class="button">
           <a href="#">Request a Demo</a>
        </div>
        </div>
        
<!--   Work       -->
        <section id="work">
          <div class="title">
            <h1>What we do</h1>
            <p>Take a look at our amazing works that cover your needs</p>
          </div>
          <div class="cards">
            <div class="card">
              <i class="fa fa-html5 fa-4x" aria-hidden="true"></i>
              <h3>HTML5 Masterclass</h3>
              <h4>HTML/HTML5</h4>
              <p>$30</p>
              <a href="#">Enroll Now</a>
            </div>
             <div class="card">
             <i id="css"class="fa fa-css3 fa-4x" aria-hidden="true"></i>
              <h3>CSS Masterclass</h3>
              <h4>CSS/CSS3</h4>
              <p>$50</p>
              <a href="#">Enroll Now</a>
            </div>
             <div class="card">
              <i class="fa fa-globe fa-4x" aria-hidden="true"></i>
              <h3>World wide prog lang</h3>
              <h4>Javascript</h4>
              <p>$150</p>
              <a href="#">Enroll Now</a>
            </div>
          </div>
          <form action=" https://www.freecodecamp.com/email-submit"id="form">
            <label for="email">Enter email:</label>
            <input type="email" id="email" name="email" placeholder="Example@gmail.com" required>
            <input id="submit" type="submit" value="submit">
          </form>
        </section>
        
<!--    Deals      -->
        <section id="Deals">
           <div class="title">
             <h1>Course Description</h1>
             <p>Lifetime Access</p>
          </div>
          <div class="ifram">
          <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/Nn7EX3zkGUo" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
          </div>
          <div class="socials">
            <i class="fa fa-facebook" aria-hidden="true"></i>
            <i class="fa fa-instagram" aria-hidden="true"></i>
            <i class="fa fa-youtube" aria-hidden="true"></i>
            <p>DG_Codeboy</p>
          </div>
        </section>
      </main>

     
        </body>
              
            
!

CSS

              
                * {
  padding:0;
  margin:0;
  box-sizing:border-box;
}
a {
  text-decoration:none;
  font-size:15px;
  color:white;
}
#back {
  background:darkorange;
  height:100vh;
}

#header {
  display:flex;
  justify-content:space-between;
  padding-top:10px;
}
#nav-bar {
position:fixed;
top:2%;
right:10%;
}
.nav-link {
  color:black;
}
#nav-bar ul {
  display:flex;
  list-style:none;
}
#nav-bar ul li {
  padding:0 10px;
}
#nav-bar ul li a:hover {
  border-bottom:3px solid black;
}
#navbar2 {
  display:none;
}
.log {
  margin-left:30px;
  margin-right:40px;
  border:1px solid black;
  padding:7px;
  padding-right:20px;
  padding-left:20px;
  color:black;
}
.log:hover {
  background:white;
  color:black;
  border-radius:5px;
  border-color:white;
  border-bottom:3px solid white;
}
#header-img {
  width:70px;
  margin-left:40px;
  border-radius:50px;
}

/* showcase */
.showcase {
  text-align:center;
  margin-top:250px;
}
.showcase h1 {
  font-size:55px;
  color:white;
}
.showcase p {
  font-size:15px;
  color:white;
}
.button {
  text-align:center;
  margin-top:50px;  
}
.button a{
  border:1px solid white;
  padding:10px;
}
.button a:hover {
  background:white;
  color:black;
  border-radius:5px;
}
#menubtn .fa {
  opacity:0;
}


@media (max-width:700px) {
    #nav-bar {
      display:none;
    }
    #navbar2 {
        display:block;
        background:orange;
        opacity:0.9;
        width:200px;
        height:100vh;
        position:fixed;
        top:0;
        right:-250px;
        z-index:2;
        transition:0.6s;

    }
    #navbar2 ul {
      list-style:none;
      margin-top:20px;
    }
    #navbar2 ul li {
        margin-top:30px;
        margin-left:10px;
    }
  #navbar2 ul li a:hover {
    border-bottom:3px solid white;
  }
    #header {
        display:grid;
        grid-template-columns:repeat(2,1fr);
    }
    .log {
        margin-left:0;
    }
    #menubtn {
        position:fixed;
        top:0px;
        right:10px;
        margin-top:15px;
        margin-right:30px;
        background:orange;
        width:50px;
        height:50px;
        text-align:center;
        z-index:3;
        cursor:pointer;

    }
    #menubtn .fa {
        opacity:1;
        text-align:center;
        width:20px;
        font-size:20px;
        margin-top:15px;
    }
    .showcase {
        margin-top:100px;
    }
    .showcase h1 {
        font-size:32px;
    }
  }

/* work */
#work {
  width:100%;
  padding:50px;
}
.title {
  text-align:center;
}
.title h1 {
  font-size:50px;
  margin-bottom:0;
}
.title p {
  font-size:16px;
  color:green;
}
.cards {
  display:grid;
  grid-gap:30px;
  grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
  text-align:center;
}
.card {
  background:lightgray;
  padding:15px;
  margin-top:20px;
  padding-bottom:22px;
  box-shadow:0 7px 8px 1px black;
}
.card #css {
  color:red;
}
.card h3 {
  color:green;
  margin-top:10px;
  margin-bottom:5px;
}
.card p {
  margin-bottom:15px;
  font-size:20px;
  font-style:italic;
  font-weight:bold;
  margin-top:5px;
}
.card a {
  color:white;
  border:0.5px solid black;
  padding:7px;
  background:green;
  border:0;
  border-radius:5px;
}
.card a:hover {
  background:darkgreen;
}

/* Deals */
#Deals {
  width:100%;
  padding:50px;
  background:darkorange;
  padding-bottom:0;
}
.ifram {
  text-align:center;
  margin-top:20px;
}

#form {
  text-align:center;
  margin-top:35px;
}
#email {
  padding:8px;
  background:darkblue;
  border-radius:7px;
  border:0;
}
::placeholder {
  color:white;
}
input {
  background:green;
  padding:7px;
  border-radius:7px;
  color:white;
  cursor:pointer;
}
input:hover {
  background:darkgreen;
}
label {
  font-size:18px;
  font-weight:bold;
}
.socials {
  text-align:center;
  margin-top:40px;
}
.socials .fa {
  width:35px;
  height:35px;
  font-size:25px;
  line-height:35px;
  background:black;
  color:darkorange;
  margin-right:15px;
  cursor:pointer;
  transition:0.7s;
  border-radius:5px;
}
.socials .fa:hover {
  background:green;
  color:white;
  transform:translateX(10px);
}
.socials p {
  font-size:18px;
  font-style:italic;
  font-weight:bold;
  margin-top:3px;
}
html {
  scroll-behavior: smooth;
}

@media (max-width:700px) {
input {
  display:block;
  margin:auto;
  margin-top:7px;
  width:40%;
}
#email {
  width:60%;
}

.ifram #video {
  width:350px;
}
.title h1 {
  font-size:25px;
}
}
@media (max-width:400px) {
.ifram #video {
 width: 250px;
}
input {
  width:30%;
}
#email {
  width:40%;
}
}
              
            
!

JS

              
                
        var menubtn=document.getElementById("menubtn")
        var navbar2=document.getElementById("navbar2")
        var menu=document.getElementById("menu")
        menubtn.onclick = function() {
          if(navbar2.style.right=="-250px") {
            navbar2.style.right="0";
          }
         else {
          navbar2.style.right="-250px";
         }
        }

              
            
!
999px

Console