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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                  <nav id="navigation" class="site-navigation" role="navigation">
  <ul class="menu">
    <li class="menu-item"><a href="#">News</a></li>
    <li class="menu-item"><a href="#">Snippets</a>
      <ul class="dropdown">
        <li class="menu-item sub-menu"><a href="#">CSS</a></li>
        <li class="menu-item sub-menu"><a href="#">HTML</a></li>
        <li class="menu-item sub-menu"><a href="#">jQuery</a></li>
        <li class="menu-item sub-menu"><a href="#">PHP</a></li>
        <li class="menu-item sub-menu"><a href="#">WordPress</a></li>
      </ul>
    </li>
    <li class="menu-item"><a href="#">Inspiration</a></li>
    <li class="menu-item"><a href="#">Tools</a></li>
    <li class="menu-item"><a href="#">Tutorials</a></li>
  </ul>
</nav>
              
            
!

CSS

              
                body {
  background: #1f1f1f;
}

.site-navigation {
	display: block;
	font-family: 'Titillium Web', sans-serif;
	font-size: 16px;
	font-weight: bold;
	margin: 40px;
}

.site-navigation ul {
  background: #3498DB;
	list-style: none;
	margin: 0;
	padding-left: 0;
}

.site-navigation li {
	color: #fff;
  background: #3498DB;
	display: block;
	float: left;
	margin: 0 2px 0 0;
	padding: 12px;
	position: relative;
	text-decoration: none;
	text-transform: uppercase;
}
  
.site-navigation li a {
  color: #fff;
  text-decoration: none;
  display: block;
}

.site-navigation li:hover {
	@include transition(background, 0.2s);
	background: #52a6df;
	cursor: pointer;
}

.site-navigation ul li ul {
	background: #52a6df;
	visibility: hidden;
	float: left;
  min-width: 150px;
	position: absolute;
  transition: visibility 0.65s ease-in;
  margin-top:12px;
	left: 0;
	z-index: 999;
}

.site-navigation ul li:hover > ul,
.site-navigation ul li ul:hover {
   visibility: visible;
}

.site-navigation ul li ul li {
	clear: both;
	padding: 5px 0 5px 18px;
  width: 100%;
}

.site-navigation ul li ul li:hover {
	background: #74b7e4;
}
              
            
!

JS

              
                
              
            
!
999px

Console