Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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="page-container">
<!-- HERO/HEADER AREA -->
  <header id="header">
    <div id="hero-area">
<!-- Navbar -->
      <div id="navbar">
        <div id="navbar-flexbox">
          <div id="logo">LOGO</div>
          <div id="nav-hamburger">NAV</div>
        </div>
      </div>

<!-- Here Area Contents -->
      <div id="hero-name">
        <h1>Hero Area H1</h1>
      </div>

      <div id="hero-blurb">
        Blurb - Scroll Down For More
      </div>
      
      <div id="hero-arrow">
        <div id="down-arrow">
          *down arrow*
        </div>
      </div>
    </div>
  </header>
  
<!-- MAIN CONTENT -->
  <div id="main-body">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras quis vulputate purus. Morbi sit amet porttitor tortor. Nam aliquet diam at porttitor mattis. Curabitur a tellus nec lacus dignissim maximus eget eu dui. Vestibulum dapibus, mi quis feugiat fringilla, nunc mauris tincidunt augue, sit amet dapibus ipsum dolor vel urna. Praesent lobortis commodo venenatis. Etiam finibus dui eu ullamcorper lacinia. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.</p>
    <p>Suspendisse faucibus leo mauris, eget sagittis ex dignissim eu. Nullam sit amet risus tempor, suscipit lorem a, condimentum sapien. Nam eu lectus eu quam mattis facilisis imperdiet nec mi. Praesent volutpat tortor vitae felis fermentum venenatis. Pellentesque felis dui, dignissim sit amet pretium vitae, pretium eget odio. Etiam accumsan congue enim, at aliquet dolor gravida tristique. Donec rhoncus egestas justo aliquet viverra. Vivamus sed fringilla nibh.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras quis vulputate purus. Morbi sit amet porttitor tortor. Nam aliquet diam at porttitor mattis. Curabitur a tellus nec lacus dignissim maximus eget eu dui. Vestibulum dapibus, mi quis feugiat fringilla, nunc mauris tincidunt augue, sit amet dapibus ipsum dolor vel urna. Praesent lobortis commodo venenatis. Etiam finibus dui eu ullamcorper lacinia. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.</p>
    <p>Suspendisse faucibus leo mauris, eget sagittis ex dignissim eu. Nullam sit amet risus tempor, suscipit lorem a, condimentum sapien. Nam eu lectus eu quam mattis facilisis imperdiet nec mi. Praesent volutpat tortor vitae felis fermentum venenatis. Pellentesque felis dui, dignissim sit amet pretium vitae, pretium eget odio. Etiam accumsan congue enim, at aliquet dolor gravida tristique. Donec rhoncus egestas justo aliquet viverra. Vivamus sed fringilla nibh.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras quis vulputate purus. Morbi sit amet porttitor tortor. Nam aliquet diam at porttitor mattis. Curabitur a tellus nec lacus dignissim maximus eget eu dui. Vestibulum dapibus, mi quis feugiat fringilla, nunc mauris tincidunt augue, sit amet dapibus ipsum dolor vel urna. Praesent lobortis commodo venenatis. Etiam finibus dui eu ullamcorper lacinia. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.</p>
    <p>Suspendisse faucibus leo mauris, eget sagittis ex dignissim eu. Nullam sit amet risus tempor, suscipit lorem a, condimentum sapien. Nam eu lectus eu quam mattis facilisis imperdiet nec mi. Praesent volutpat tortor vitae felis fermentum venenatis. Pellentesque felis dui, dignissim sit amet pretium vitae, pretium eget odio. Etiam accumsan congue enim, at aliquet dolor gravida tristique. Donec rhoncus egestas justo aliquet viverra. Vivamus sed fringilla nibh.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras quis vulputate purus. Morbi sit amet porttitor tortor. Nam aliquet diam at porttitor mattis. Curabitur a tellus nec lacus dignissim maximus eget eu dui. Vestibulum dapibus, mi quis feugiat fringilla, nunc mauris tincidunt augue, sit amet dapibus ipsum dolor vel urna. Praesent lobortis commodo venenatis. Etiam finibus dui eu ullamcorper lacinia. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.</p>
    <p>Suspendisse faucibus leo mauris, eget sagittis ex dignissim eu. Nullam sit amet risus tempor, suscipit lorem a, condimentum sapien. Nam eu lectus eu quam mattis facilisis imperdiet nec mi. Praesent volutpat tortor vitae felis fermentum venenatis. Pellentesque felis dui, dignissim sit amet pretium vitae, pretium eget odio. Etiam accumsan congue enim, at aliquet dolor gravida tristique. Donec rhoncus egestas justo aliquet viverra. Vivamus sed fringilla nibh.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras quis vulputate purus. Morbi sit amet porttitor tortor. Nam aliquet diam at porttitor mattis. Curabitur a tellus nec lacus dignissim maximus eget eu dui. Vestibulum dapibus, mi quis feugiat fringilla, nunc mauris tincidunt augue, sit amet dapibus ipsum dolor vel urna. Praesent lobortis commodo venenatis. Etiam finibus dui eu ullamcorper lacinia. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.</p>
    <p>Suspendisse faucibus leo mauris, eget sagittis ex dignissim eu. Nullam sit amet risus tempor, suscipit lorem a, condimentum sapien. Nam eu lectus eu quam mattis facilisis imperdiet nec mi. Praesent volutpat tortor vitae felis fermentum venenatis. Pellentesque felis dui, dignissim sit amet pretium vitae, pretium eget odio. Etiam accumsan congue enim, at aliquet dolor gravida tristique. Donec rhoncus egestas justo aliquet viverra. Vivamus sed fringilla nibh.</p>
  </div>

<!-- FOOTER -->
  <div id="footer">
  footer content here
  
  
  </div>
</div>







              
            
!

CSS

              
                body {
  width: 100%;
  margin: 0;
}

#hero-area {
  background-image: linear-gradient(
    to right,
    #f00, #00f
  );
  background-size: cover;
  width: 100%;
  height: 100vh;
  text-align: center;
}

#navbar {
  background-color: rgba(50, 50, 50, 0.5);
  color: #fff;
  padding: 10px;
/* Without the four declarations below (position, width, box-sizing, top), then hero area and navbar are at the top.  With them, there is a white bar on CodePen. On my site that top white bar is not there. */
  position: fixed;
  width: 100%;
  box-sizing: border-box;
  top 0;
}

#navbar-flexbox {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
}

h1 {
  margin-top: 0;
  line-height: 6;
}

#main-body {
  padding: 5px 25px;
}

#footer {
  background-color: #0f0;  
}

#hero-arrow {
  line-height: 5;
}



              
            
!

JS

              
                
              
            
!
999px

Console