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

              
                <!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="stylesheet" href="https://codepen.io/chriscoyier/pen/YrbNGP.css">
  <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
  <link href="https://fonts.googleapis.com/css?family=Rubik" rel="stylesheet">
  <title>w-digital landing page v1</title>
</head>

<body>
  <div id="container" class="container">
    <header id="header">
      <figure class="logo-container">
        <img src="https://w-digital.co/assets/img/w-digital.png" alt="w-digital logo" class="header-logo" id="header-img">
      </figure>
      <nav id="nav-bar" class="nav" role="navigation">
        <ul>
          <li>
            <a class="nav-link" href="#section-hero">
              Home
              <span>had a page</span>
            </a>
          </li>
          <li>
            <a class="nav-link" href="#section-price">
              Pricing
              <span>is really worth</span>
            </a>
          </li>
          <li>
            <a class="nav-link" href="#section-contact">
              Contact
              <span>virtual through cables</span>
            </a>
          </li>
        </ul>
      </nav>
    </header>
    <main id="main">
      <article>
        <section id="section-hero">
          <div class="hero-word">
            <p class="subtitle">Landing Page That Convert</p>
            <h1 class="title">Get More Sales, with custom automatic geotargeted Landing Page</h1>
            <form id="form" class="form" action="https://www.freecodecamp.com/email-submit">
              <input name="email" type="email" id="email" placeholder="jill@email.com">
              <input type="submit" id="submit" value="Get Started"></input>
            </form>
          </div>
          <!-- video -->
          <div class="hero-image">
            <figure class="video-container">
              <video src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4" id="video" controls muted></video>
            </figure>
          </div>
        </section>
        <section id="section-price"></section>
        <section id="section-contact"></section>

      </article>
    </main>
    <footer id="footer">
      <div class="footer-text">
        Product Landing Page Crafted in 2018 - <a href="https://w-digital.co" target="_blank">Herwindo Artono</a>
      </div>
    
    </footer>
    <div class="bg-top"></div>
  </div>
</body>

</html>
              
            
!

CSS

              
                /* Layout */
#container {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 19% 1fr 19%;
  grid-template-areas: 
    "header"
    "main"
    "footer"
}
#header {
  grid-area: header;
}
#main {
  grid-area: main;
}
#footer {
  grid-area: footer;
}

/* internal layout */
#header {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between; 
  align-items: center;
}
#header-img {
  margin: 1.618rem 1.6rem 0 1.6rem;
}
nav {
  margin-right: 1.618rem;
}

/* navigation layout */
nav ul {  
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.nav-link {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}

/* Style / Theme */
.container {
  font-family: "Rubik", sans-serif;
  background: #ebebeb;
}
.logo-container {
  width: 100px;
}
.header-logo {
  width: 148.5px;
  height: auto;
  max-width: 50%;
  display: block;
}

.nav ul {
  list-style-type: none;
  color: black;
}
.nav-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  padding: .618em;
  font-size: 1.2rem;
  font-weight: 800;
  color: black;
}
.nav-link > span {
  font-size: 1rem;
  font-weight: 200;
  opacity: .6
}
.nav-link:hover {
  text-decoration: none;
  color: inherit;
  background-color: rgba(255, 255, 255, .618);
}

main#main, header#header {
  z-index: 1;
}
section {
  margin: 3em 0;
  
}

/* Section Hero */
#section-hero {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
}
.hero-word {
  flex-basis: 38%;
  flex-grow: 1;
  padding: 1em;
  display: flex;
  flex-flow: row wrap;
}
.hero-image {
  flex-basis: 62%;
  flex-grow: 1;
  padding: 1em;
}
.hero-word > .form {
  display: flex;
}
.video-container {
  display: block;
}
.video-container > #video {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 10px 10px 0px 0px rgba(0, 0, 0, .16);
}

.bg-top {
  position: absolute;
  display: block;
  top: -60%;
  right: -50%;
  z-index: -100;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #D32FB3, #911D7B);
  border-radius: 10vmax;
  transform: rotate(25deg);
  opacity: .83;
}

#footer {
  margin: 3em 0;
}
.footer-text {
  display: flex;
  justify-content: center;  
  font-size: .83em;
  opacity: .8;
  font-style: italic;
}

@media (max-width: 900px) {
  #header {
      flex-flow: row wrap;
      justify-content: center; 
  }
  .nav-link {
    align-items: center;
  }
  .hero-word {
    justify-content: center;
  }
  .hero-word .title, .hero-word .subtitle {
    text-align: center;
  }
}
@media (min-width: 1280px) {
  #container {
    grid-template-columns: 1fr 61.8% 1fr;
    grid-template-areas: 
      ". header ."
      ". main ."
      ". footer .";
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console