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

              
                <div id="main">
  
  <div id="header">
    <a id="img_link" href="#" target="_blank"><img id="header-img" src="https://upload.wikimedia.org/wikipedia/commons/d/d3/Corsair_logo.png" alt="corsair_logo"></a>
    <nav id="nav-bar">      
      <ul>
        <li><a href="#features" class="nav-link">Features</a></li>
        <li><a href="#iframe-container" class="nav-link">How It Works</a></li>
        <li><a href="#pricing" class="nav-link">Pricing</a></li> 
    </nav>
  </div>
  
  <form id="form" action="https://www.freecodecamp.com/email-submit" target="_blank">
    <label for="email">ONE BATTLE, MAKE IT COUNT</label>
    <input type="email" id="email" name="email" placeholder="Enter your email address">
    <input type="submit" id="submit" value="Get Started">
  </form>
  
    
    
    
  <div id="features">
      <div class="logo-text">
        <i class="fas fa-sun fa-2x"></i>    
        <div class="head-para">
          <h3>Processor Power</h3>
          <p>AMD Zen 2 architecture offers incredible single threaded and multi-threaded performance, and with the available 3950X processor, you can easily run your favorite games</p>   
        </div><!--head para first-->
      </div>
    
    <div class="logo-text">
        <i class="fas fa-gamepad fa-2x"></i>     
        <div class="head-para">
          <h3>NVIDIA GEFORCE RTX GRAPHICS</h3>
          <p>Game with incredibly lifelike graphics and smooth frame rates thanks to a GeForce RTX graphics card powered by CUDA and real-time ray tracing technology.</p>     
        </div><!--head para second-->
    </div>
         
    <div class="logo-text">
        <i class="fas fa-memory fa-2x" ></i>      
        <div class="head-para">
          <h3>SUPPORT UP TO 32GB OF MEMORY</h3>
          <p>Loaded with 32GB VENGEANCE LPX DDR4 memory which allows you to outperform and outlast</p>      
        </div><!--head para third-->
     </div>         
  </div><!--features end-->
    
  <!--HOW IT WORKS-->
  <div id="iframe-container">
    <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/etLoDkM50fU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  </div>
    
  
   <!--Pricing--> 
<div id="pricing">
  
   <div class="columns">
     <h3 class="pc-name">CORSAIR ONE i200 Compact Gaming PC</h3>
     <p class="price">$3,599.99</p>
     <img class="pc-image" src="https://www.corsair.com/medias/sys_master/images/images/he8/h8c/9441957445662/-CS-9030008-NA-Gallery-VENGEANCE-6100-01.png" alt="i200 Compact gaming pc">
     <button class="buttons">SELECT</button>
   </div>
   
   <div class="columns">
     <h3 class="pc-name">CORSAIR VENGEANCE 6180 Gaming PC</h3>
     <p class="price">$1,899.99</p>
     <img class="pc-image" src="https://www.corsair.com/medias/sys_master/images/images/h28/h1a/9528381243422/CS-9020015-NA/Gallery/CORSAIR_ONE_i145_01/-CS-9020015-NA-Gallery-CORSAIR-ONE-i145-01.png_1200Wx1200H" alt="6180 gaming pc">
     <button class="buttons">SELECT</button>
   </div>
  
   <div class="columns">
     <h3 class="pc-name">CORSAIR ONE PRO i182 Compact Workstation-Grade PC</h3>
     <p class="price">$4,199.99</p>
     <img class="pc-image" src="https://www.corsair.com/medias/sys_master/images/images/h9b/h58/9320871165982/-CS-9040003-NA-Gallery-CORSAIR-ONE-PRO-01.png" alt="i182 Compact Workstation">
     <button class="buttons">SELECT</button>
   </div> 
</div><!--PRICING END-->

<!--FOOTER-->
 <footer id="footer">
   <ul>
     <li><a href="#">Privacy</a></li>
     <li><a href="#">Terms</a></li>
     <li><a href="#">Contract</a></li>
   </ul>
   <p>Copyright 2020, Corsair</p>
 </footer>
    
    
    
    
  
</div>
              
            
!

CSS

              
                *{
  box-sizing:border-box;
  margin:0;
  padding:0;
}
#header{
  display: flex;
  justify-content:space-between;
  align-items:center;
  background-color:#333;
  color:white;
  width:100%;
  position:fixed;
  top:0;
}
#header-img{
  width: 80px;
  height:auto;
  padding: 0 10px;
}
#nav-bar ul{
  display:flex;
  flex-flow:row;
  margin:0;
  padding:0;
}
#nav-bar ul li{
  list-style:none;
}
#nav-bar ul li a{
  text-decoration: none;
  color:white;
  display:block;
  padding: 1rem;
}
#nav-bar ul li:hover{
  background-color:#555;
}


form{
 display:flex;
 flex-direction:column;
 align-items:center;
 padding: 2rem 1rem;
  margin-top:5rem;
  margin-bottom:2rem;
}
form input[type=email]{
  margin:.5rem 0;
  padding:.5rem;
}
form input[type=submit]{
  padding:0.5rem;
  border:none;
  font-weight:bold;
  background-color:grey;
}

#features{
 display:flex;
 flex-direction:column;
}

.logo-text{
  display:flex;
  flex-direction: row;
  width:100%;
  height:8rem;
}

.head-para{
  display:flex;
  flex-direction:column;
}

.fas{
  margin-left:5rem;
  margin-right:5rem;
}
.fa-memory, .fa-gamepad {
  margin-right:4.5rem;
}

/* HOW IT WORKS*/
#iframe-container{
  display:flex;
  flex-direction:row;
  justify-content:center;
  padding-bottom:10%;
}

/*PRICING*/
#pricing{
  display:flex;
  flex-flow: row nowrap;
  margin-bottom:2rem;
}
.columns{
  display:inline-flex;
  flex-flow:column nowrap;
  justify-content: center;
  align-items: center;
  align-content: center;  
  border:1px solid black;
  margin-right:2rem;
  margin-left:2rem;
  width:100%;
}
.pc-name{
  background-color:grey;
  width:100%;
  height:100%;  
  text-align:center;
}
.pc-image{
  width:10rem;
  height:10rem;
  padding:1.5rem;
}

.buttons{
  border:none;
  color:white;
  background-color:red;
  padding: 12px 24px;
  display:inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  border: 2px solid #4CAF50;
}
.buttons:hover {
  background-color: #4CAF50;
  color: white;
}

/*footer*/
#footer{
  padding:1rem;
  background-color:grey;
  margin:0 2rem;
}
footer ul, p{
  display:flex;
  flex-flow: row wrap;
  justify-content: flex-end;  
}
footer p{
  top:1rem;
  padding-right:8px;
}
footer ul li{
  list-style:none;
}

footer ul li a{
  text-decoration:none;
  display:block;
  padding: 0 8px;
  color:black;
  font-weight:bold;
}






/*Smaller screen*/
@media (max-width:400px){  
  
 #header{
   flex-direction:column;
   align-items:flex-center;
 }
#nav-bar{  
    width:100%;
  }
  #nav-bar ul{
    flex-direction:column;   
  }
  #nav-bar li{
    text-align:center;
  }
  #nav-bar ul li a{
    padding: 0.5rem 1rem;
  }  
  
  form{
    margin-top:8rem;
  }
    
   .logo-text{
    height:8rem;
     text-align:center;
  }
  .fas{
    display:none;
  }
  
  #pricing{
    display:flex;
    flex-direction:column; 
    margin:0 2rem;
    
  }
  .columns{
    margin:2rem 0;
    padding:0;
    
  }
}




              
            
!

JS

              
                
              
            
!
999px

Console