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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                
  <header id="header">
    <div class="logo">
      <a href="https://codepen.io/gezo1993/full/qGxvVg"><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTHr71adIAbr9sV4RzR36A7ViH_QGDuqD8eOUv2UyZuDU1CK_sSPQ" id="header-img" alt="yamaha logo"></a>
    </div>
    <nav id="nav-bar">
      <ul>
        <li><a href="#form-section" class="nav-link">Register</a></li>
        <li><a href="#video-section" class="nav-link">How it works</a></li>
        <li><a href="#available-products" class="nav-link">Products</a></li>
      </ul>
    </nav>
  </header>
  <section id="form-section">
    <h2 id="notification-heading"> Subscribe to receive notifications on new products</h2>
    <form id="form" action="https://www.freecodecamp.com/email-submit)">
      <input type="email" id="email" name="email" placeholder="Enter your email" required>
      <input type="submit" id="submit" value="Subcribe">
    </form>
  </section>

  <section id="video-section">
    <h2 id="video-heading">Our Story</h2>
    <iframe id="video" src="https://www.youtube.com/embed/fKGu54YKkSE">
    </iframe>
  </section>
  <section id="product-section">
    <h2 id="available-products">Available Products</h2>
      <div id="row-view">
        <div class="product-card">
          <div id="piano-image-container">
            <img src="https://c.76.my/Malaysia/yamaha-dgx-660-88-key-digital-piano-free-shipping-satchman-1605-29-satchman@18.jpg" alt="YAMAHA DGX-660 - 88-Key Digital Piano" id="piano-img">
          </div>
          <div class="content-container">
            <h3 class="content-header">YAMAHA DGX-660 - 88-Key Digital Piano</h3>
            <p id="piano-price">$799.99</p>
            <p class="content-para">One of Yamaha's premium portable pianos.</p>
          </div>
          <div class="button-div">
          <button id="piano-button">Add to Cart</button>
          </div>
        </div>
        <div class="product-card">
          <div id="guitar-image-container">
            <img src="https://images.reverb.com/image/upload/s--uUAkT5Te--/f_auto,t_large/v1543265277/pnaoxei3txjeufs0rul2.jpg" alt="yamaha acoustic guitar with a hard shell case" id="guitar-img">
          </div>
          <div class="content-container">
            <h3 class="content-header">Yamaha APX600FM Acoustic Electric Guitar</h3>
            <p id="guitar-price">$359.95</p>
            <p class="content-para">Yamaha APX600FM comes with a thin body depth that is comforatable for acoustic electic guitar players.</p>
          </div>
          <div class="button-div">
          <button id="guitar-button">Add to Cart</button>
          </div>
        </div>
        <div class="product-card">
          <div id="violin-image-container">
            <img src="https://images-na.ssl-images-amazon.com/images/I/51GjXHp4VSL._SL1000_.jpg" alt="Yamaha Model 5 Violin" id="violin-img">
          </div>
          <div class="content-container">
            <h3 class="content-header">Yamaha Model 5 Violin</h3>
            <p id="violin-price">$935.75</p>
            <p class="content-para">Yamaha Model 5 Violin is a quality instrument for young students.</p>
          </div>
          <div class="button-div">
          <button id="violin-button">Add to Cart</button>
          </div>
      </div>
    </div>
  </section>
<footer>
  Yamaha copyright &copy; 2019
</footer>


              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Roboto&display=swap");
body {
  background: linear-gradient(90deg, #E0EAFC, #CFDEF3);
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
}

/* Beginning of header */

/* Beginning of Global header */
#header {
  position: fixed;
  background-color: #ffffff;
  top: 0;
  width: 100%;
  height: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* End of Global header */

.logo {
  width: 200px;
  height: 60px;
}

#header-img {
  width: 80%;
  height: 100%;
  display: block;
  margin: auto;
}

#nav-bar ul {
  list-style: none;
  display: flex;
}

#nav-bar ul li a {
  color: #000000;
  font-size: 18px; 
  text-transform: capitalize;
  text-decoration: none;
  padding: 10px 20px 10px 20px;
}

/* Beginning of keyframes */
.nav-link:hover {
  animation-name: nav-hover;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

.nav-link:active {
  animation-name: nav-active;
  animation-duration: 500ms;
}

@keyframes nav-hover {
  100% {
    color: #fd746c;
    border-bottom: 2px solid #fd746c;
  }
}

@keyframes nav-active {
  20% {
    color: #a044ff;
    border-bottom: 2px solid #a044ff;
  }
}
/* End of keyframes */

/* End of header */

/* Begining of form */
#form-section {
  margin-top: 60px;
  display: block;
  width: 100%;
  height: 700px;
  background: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("http://img-cdn.jg.jugem.jp/53c/1489830/20150222_949801.jpg") no-repeat center;
  background-size: cover;
}

#form-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#notification-heading {
  text-align: center;
  color: #ffffff;
  padding-top: 350px;
  font-size: 2em;
}

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

#email {
  width: 300px;
  height: 25px;
  padding: 5px 0 5px 5px;
  border-radius: 5px;
  margin-bottom: 20px;
}

#submit {
  margin: 0 auto;
  width: 200px;
  height: 40px;
  font-size: 18px;
  border-color: transparent;
  border-radius: 5px;
  cursor: pointer;
}

/* Beginning of keyframes for subscribe button */
#submit:hover {
  animation-name: submit-hover;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

#submit:active {
  animation-name: submit-active;
  animation-duration: 500ms;
}

@keyframes submit-hover {
  100% {
    background-color: #fd746c;
    color:#ffffff;
  }
}

@keyframes submit-active {
  20% {
    background-color: #a044ff;
    color:#ffffff;
  }
}
/* End of keyframes for subscribe button */
/* End of form */

/* Beginning of Video section */
#video-section {
  margin: 100px 0 100px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#video-heading {
    font-size: 40px;
}

#video {
  width: 60%;
  height: 400px;
  border: none;
}
/* End of Video section */

/* Beginning of Product section */
.product-card {
  display: block;
  border: 1px solid #000000;
  width: 300px;
  height: auto;
  margin: 0 10px 0 10px;
  object-fit: cover;
}

#piano-img {
  width: 100%;
  height: 300px;
}

#guitar-img {
  width: 100%;
  height: auto;
}

#violin-img {
  width: 100%;
  height: auto;
}

#row-view {
  display: flex;
  justify-content: center;
}

#available-products {
  text-align: center;
  font-size: 40px;
}

.content-container {
  text-align: center; 
}

.content-para {
  padding: 0 40px 0 40px;
}

#piano-price {
  font-weight: bold;
}

#guitar-price {
  font-weight: bold;
}

#violin-price {
  font-weight: bold;
  padding-top: 23px;
}

.button-div {
  display: flex;
  justify-content: center;
}

#piano-button {
  width: 60%;
  height: 40px;
  margin-top: 57px;
  border-color: transparent;
  border-radius: 5px;
  background-color: #fd746c;
  color: #ffffff;
  cursor: pointer;
}

#guitar-button {
  width: 60%;
  height: 40px;
  margin: 20px 0 20px 0;
  border-color: transparent;
  border-radius: 5px;
  background-color: #fd746c;
  color: #ffffff;
  cursor: pointer;
}

#violin-button {
  width: 60%;
  height: 40px;
  margin-top: 40px;
  border-color: transparent;
  border-radius: 5px;
  background-color: #fd746c;
  color: #ffffff;
  cursor: pointer;
 }

#piano-button:hover {
  background-color: 	#FF69B4;
}

#guitar-button:hover {
  background-color: 	#FF69B4;
}

#violin-button:hover {
  background-color: 	#FF69B4;
}
/* End of Product section */

/* Beginning of Media Queries */
@media (max-width: 985px) {
  #guitar-img {
    height: 300px;
  }
  
   #violin-img {
    height: 300px;
  }
}

@media (max-width: 923px) {
  #piano-button {
    margin-top: 76px;
  }
  
  #violin-button {
    margin-top: 59px;
  }
}

@media (max-width: 800px) {
  #header {
    display: flex;
    flex-direction: column;
  }
  
  #nav-bar ul {
    display: flex;
    flex-direction: column;
    margin-top: 5px;
  }
  .nav-link {
    display: block;
  }
  #video {
    width: 100%;
  }
  
  #row-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  }
  
  .product-card {
   margin: 10px 0 10px 0;
  }
  
  #piano-button {
    margin: 20px 0 20px 0;
  }
  
  #violin-button {
    margin: 20px 0 20px 0;
  }
}
/* End of Media Queries */

/* Footer */
footer {
  background-color: #ffffff;
  font-size: 20px;
  text-align: center;
  padding: 15px 0 15px 0;
  margin-top: 40px;
}


              
            
!

JS

              
                
              
            
!
999px

Console