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

              
                <body>

  <header id="header">
    <img id="header-img" src="https://i.imgur.com/kX25qb9.png" alt="company logo">
    <nav id="nav-bar">
      <a class="nav-link" href="#video">Video</a>
      <a class="nav-link" href="#form">Order</a>
      <a class="nav-link" href="#features">Features</a>
      <a class="nav-link" href="#prices">Options</a>
    </nav>
    <br><span id="company-name">Fiber & Wi-Fi Systems</span>
  </header>

  <main>
    <div class="iframe-container">
      <iframe id="video" src="https://www.youtube.com/embed/Wj_jOno28zA"></iframe>
    </div>

    <form id="form" action="https://www.freecodecamp.com/email-submit">
      <input type="email" id="email" name="email" placeholder="Enter Email Address" required>
      <input id="submit" type="submit" value="Order Today">
    </form>

    <h2 id="systems">Systems Features</h2>
    <div id="features">
      <div class="detail">
        <h2>100% fiber-optic network.</h2>
        <p>Super Quick Systems offers fast, reliable internet with bandwidth for multiple devices and
          4k-compatible
          TV picture quality.</p>
      </div>
      <div class="detail">
        <h2>Upload and download fast.</h2>
        <p>Stream, game and video chat with less wait. Our fastest internet gives you upload speeds of up to 25x
          faster than cable.</p>
      </div>

      <div class="detail">
        <h2>Super Quick Wireless?</h2>
        <p>Get more while paying less. Save up to $20/mo when you combine your wireless plan with a Fios
          Internet
          plan.</p>
      </div>
    </div> <br><br>

    <h2>Options and Prices</h2>
    <div id="prices">
      <div class="plans">
        <h2>Gigabit Connection $88.99 per month.</h2>
        <p>Ideal for a virtually seamless entertainment experience. Up to 940/880 Mbps.
          Plan includes: Whole-Home Wi-Fi Router + Asus Notebook 2 15.9" (32GB)
        </p>

      </div>
      <div class="plans">
        <h2>400 Mbps $65.99 per month.</h2>
        <p>Great for multiple users, binge streaming and sharing large files.
          Plan includes: Samsung Galaxy Tab A7 Lite + Whole-Home Wi-Fi Router.</p>
      </div>
      <div class="plans">
        <h2>200 Mbps $38.99 per month.</h2>
        <p>Stream and download movies, shows and photos. Plan includes:
          Whole-Home Wi-Fi Router + Samsung mobile A12</p>
      </div>
    </div>

  </main>

</body>
              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  scroll-padding-top: 142px;
}

html {
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  font-size: 16px;
  width: 100%;
}

body {
  width: 100%;
  min-width: 320px;
  min-height: 100vh;
  border: 1px dashed red;
  background-color: moccasin;
}

#header {
  position: sticky;
  top: 0;
  height: 140px;
  padding: 10px;
  background-color: lightsteelblue;
  z-index: 999;
}

main {
  max-width: 100%;
  margin: 0;
  padding: 30px 20px 90px 20px;
}

#header-img {
  width: 100px;
  margin: auto 0 auto 40px;
}

#nav-bar {
  background-color: yellow;
  border: 2px solid black;
  border-radius: 5px;
  padding: 5px;
  width: 25%;
  float: right;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-link {
  color: blue;
  margin: 5px;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  flex-grow: 1;
}

#nav-bar a:hover {
  background-color: #ddd;
  color: black;
}

div h2 {
  margin: auto;
  text-align: center;
  font-size: 18px;
  padding: 10px 10px;
}

h2 {
  font-size: 18px;
  text-align: left;
  margin-bottom: 12px;
}

#company-name {
  display: inline-block;
  font-size: 18px;
}

.iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

#email {
  margin-top: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  padding: 5px;
  height: 30px;
  background-color: yellow;
}
#submit {
  margin: top 20px;
  height: 30px;
  width: 180px;
  font-size: 1em;
  font-weight: 800;
  border: 1px black solid;
  border-radius: 5px;
  background: orange;
  cursor: pointer;
  text-align: center;
}

#features {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-around;
  padding: 5px;
}

#features.target {
  padding-top: 5px;
}

#features > div {
  flex: 1 1 auto;
  border: 1px solid black;
  text-align: left;
  margin: 5px;
}

.detail p {
  padding: 10px;
}

#prices h2 {
  text-align: left;
}

#prices {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-around;
}

#prices > div {
  flex: 1 1 auto;
  /*border: 1px solid black;*/
  text-align: left;
  margin: 5px;
  padding: 5px;
}

#systems {
  text-align: left;
  font-size: 18px;
  margin-top: 20px;
}

/* Media queries */

/* small tablets*/
@media screen and (min-width: 620px) {
  #nav-bar {
    background-color: yellow;
    padding: 5px;
    width: 60%;
    float: right;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  }

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

  #features > div {
    width: 1fr;
  }

  #pricing {
    display: flex;
    flex-direction: row;
  }

  #pricing > div {
    border: 1px solid green;
    width: 1fr;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console