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

              
                <div id="menu-wrapper">
  <div id="menu-bar"></div>
  
  <div id="menu-nav">
    <ul>
      <li>Item One</li>
      <li>Item Two</li>
      <li>Item Three</li>
    </ul>
  </div>
  
  <div id="menu-tab" class="closed">MENU</div>
</div>

<div class="content">
  
  <h1>HEADING</h1>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut lorem metus, porta ut magna ac, mollis convallis diam. Phasellus tempor eleifend orci at vehicula. Quisque ultrices nibh quis magna consectetur gravida. Vestibulum posuere urna id iaculis varius. Sed non purus vitae dui gravida lobortis id vitae quam. Pellentesque pharetra sed mi et vestibulum. Aenean vel fermentum leo. Aenean vel dignissim magna. In hac habitasse platea dictumst. Vestibulum et odio lectus. In gravida elit sit amet varius convallis. Integer nec enim eget massa cursus fringilla id nec tortor. Sed quis rhoncus est.</p>
</div>
              
            
!

CSS

              
                body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 25px;
  background-color: #333333;
  color: #D7DADB;
  margin: 0;
}

h1 {
  color: #FFFFFF;
}

.content {
  margin-top: 20px;
  padding: 0 10px;
}


/*__MENU STYLES__*/
#menu-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

#menu-bar {
  display: block;
  width: 100%;
  height: 10px;
  background-color: #FC4349;
}

#menu-tab {
  background-color: #FC4349;
  cursor: pointer;
  float: right;
  padding: 5px 10px;
  border-radius: 0 0 5px 5px;
}

#menu-nav {
  display: none;
  padding: 5px 10px;
  background-color: #FC4349;
  color: #333333;
}

#menu-nav ul {
  list-style: none;
  margin: 20px 0 30px;
  padding: 0;
}

#menu-nav ul li{
  padding: 10px;
  border-bottom: 1px solid #E03C41;
  cursor: pointer;
  text-align: center;
}

#menu-nav ul li:first-child{
  border-top: 1px solid #E03C41;
}

#menu-nav ul li:hover{
  background-color: #EB3E44;
}
              
            
!

JS

              
                // open top tab menu
$(document).on('click', '#menu-tab', function () {
	$('#menu-nav').slideToggle('slow');
});
              
            
!
999px

Console