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


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.


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

<div class="content">
  <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>


                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-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;


                // open top tab menu
$(document).on('click', '#menu-tab', function () {