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

+ add another resource


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


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.


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.


                <link href='' 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="" target="_blank">HOME</a>
    <a href="" target="_blank">ABOUT</a>
    <a href="" target="_blank">SERVICES</a>
    <a href="" 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%";