Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>

<!-- The overlay Menu -->
<div id="myNav" class="overlay">
  <!-- Button to close the overlay navigation -->
  <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
  <!-- Overlay content -->
  <div class="overlay-content">
    <a href="http://www.chris-cook.net" target="_blank">HOME</a>
    <a href="http://www.chris-cook.net" target="_blank">ABOUT</a>
    <a href="http://www.chris-cook.net" target="_blank">SERVICES</a>
    <a href="http://www.chris-cook.net" target="_blank">CONTACT</a>

<div onclick="openNav()" class="navMenu">&#9776;</div>

<div class="myPage">
  <h1>MAIN PAGE</h1>
  <h3>Place Content Here</h3>
              /* Demo Content */
body {
  margin: 0 0;
  padding: 0 0;
.myPage {
  width: 100%;
  height: 100vh;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: 'Open Sans', sans-serif;
  background: #ddd;
/* end */

/* Nav Button */
.navMenu {
  position: absolute;
  width: 40px;
  height: 40px;
  top: 30px;
  right: 30px;
  font-size: 40px;
  font-weight: 700;
  cursor: pointer;

/* The Overlay (background) */
.overlay {
    /* Height & width depends on how you want to reveal the overlay (see JS below) */    
    height: 0%;
    width: 100%;
    position: fixed; /* Stay in place */
    z-index: 999999; /* Sit on top */
    left: 0;
    top: 0;
    background-color: rgb(51,51,51); /* Black fallback color */
    background-color: rgba(0,0,0, 0.9); /* Black w/opacity */
    overflow-y: hidden;
    transition: 0.5s;

/* Position the content inside the overlay */
.overlay-content {
    position: relative;
    top: 25%;
    width: 100%;
    text-align: center; /* Centered text/links */
    margin-top: 30px; /* 30px top margin to avoid conflict with the close button on smaller screens */

/* The navigation links inside the overlay */
.overlay a {
    padding: 8px;
    text-decoration: none;
    font-size: 36px;
    color: #fff !important;
    display: block; /* Display block instead of inline */
    transition: 0.3s; /* Transition effects on hover (color) */
		text-transform: uppercase;
    font-family: 'Open Sans', sans-serif;

/* When you mouse over the navigation links, change their color */
.overlay a:hover, .overlay a:focus {
    color: #999 !important;

/* Position the close button (top right corner) */
.closebtn {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 60px !important; /* Override the font-size specified earlier (36px) for all navigation links */

/* When the height of the screen is less than 450 pixels, change the font-size of the links and position the close button again, so they don't overlap */
@media screen and (max-height: 450px) {
  .overlay {overflow-y: auto;}
  .overlay a {font-size: 20px}
  .closebtn {
    font-size: 40px !important;
    top: 15px;
    right: 35px;

              <!-- FULL PAGE MENU = = = = = -->
/* Open */
function openNav() {
    document.getElementById("myNav").style.height = "100%";

/* Close */
function closeNav() {
    document.getElementById("myNav").style.height = "0%";
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.