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

              
                <h1>Pure CSS Drop Down Menus</h1>

<nav>
<ul>
  <li class="active"><a href="" title="main page">home</a></li>
  <li><a href="" title="about The Whisker Shop">about</a></li>
  <li><a href="" title="view the FURniture gallery">catalogue</a>
    <ul>    
      <li><a href="">submenu item 1</a></li>
      <li><a href="">submenu item 2</a></li>
      <li><a href="">submenu item 3</a></li>
      <li><a href="">submenu item 4</a></li>
      <li><a href="">submenu item 5</a></li>
    </ul>
  </li>
  <li><a href="" title="cat pictures just for fun">pics</a>
  </li>
  <li><a href="contact.php" title="contact The Whisker Shop">contact</a></li>
</ul>
</nav>

<!-- thanks to https://codepen.io/philhoyt/details/ujHzd#forks for this excellent nav bar! -->
              
            
!

CSS

              
                /* This is best for wide screens only. Need to come up with something pretty for default/mobile. */
nav ul {
	list-style: none;
	position: relative;
}
nav ul a {
	display: block;
	padding: 1%;
}
nav ul li {
	position: relative;
	float: left;
	margin: 0;
	padding: 1%;
}
nav ul li:hover {
	background-color: rgba(0,0,0,0.2);
  color: rgba(255,255,255,0.7);
}
nav ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	padding: 0;
}
nav ul ul li {
	float: none;
}
nav ul ul a {
	line-height: 1em;
	padding: 10px 15px;
}
nav ul ul ul {
	top: 0;
	left: 100%;
}
nav ul li:hover > ul {
	display: block;
}
nav {
    width: 100%;
    font-family: monospace;
}
nav a {
    display: inline-block;
    color: rgba(0,0,0,1);
    text-decoration: underline dotted;
    font-weight: bold;
    line-height: 1em;
    padding-right: 1%;
    padding-left: 1%;
}
.active {
  background-color: rgba(0,0,0,0.5);
  color: rgba(0,0,0,1);
}
              
            
!

JS

              
                
              
            
!
999px

Console