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 class="multi_drop_menu">
		<ul>
      <li><a href="#">Level 1</a></li>
      <li><a href="#">Level 1</a></li>
			<li><a href="#">Level 1</a>
				<ul>
					<li><a href="#">Level 2</a></li>
					<li><a href="#">Level 2</a></li>
					<li><a href="#">Level 2</a>
						<ul>
							<li><a href="#">Level 3</a></li>
							<li><a href="#">Level 3</a></li>
							<li><a href="#">Level 3</a>
						</ul>
					</li>
				</ul>
			</li>
		</ul>
	</nav>
              
            
!

CSS

              
                @import compass

//SASS version of Charles Wyke-Smith's Method of Making Drop Drop Menus with Hotzoning of Links in mind for maximum usability. 
*
  padding: 0 
  margin: 0

.multi_drop_menu
  font: 1em helvetica, arial, sans-serif 
  a  
    display: block 
    color: rgba(#555, .8)
    background-color: #eee
    padding: .2em 1em
    border-width: 3px 
    border-color: transparent 
    &:hover 
      color: #fff
      background-color: #aaa
    &:active 
      background: #fff
      color: #ccc
  ul
    float: left //Method 2 of 3 to enclose floated elements I'm aware of. (overflow:hidden, float the parent element, or using psuedo-elements to clear)`  
  li
    float: left 
    list-style-type: none
    position: relative 
    a 
      display: block 
      border-right-style: solid 
      +background-clip(padding-box)
      text-decoration: none 
    &:last-child a 
      border-right-style: none 
    ul
      width: 9em 
      display: none
      position: absolute
      left: 0
      top: 100%
    li 
      float: none 
      a 
        border-right-style: none 
        border-top-style: solid
      ul
        position: absolute
        left: 100%
        top: 0
    &:hover > ul 
      display: block 

  &.vertical //Vertical menu works by removing the floats, and thus the horizontal ability of the menu, and making sure you absolutely position child ul elements to be exactly right of a prior ul element via left: 100% and even with it via top: 0. 
    width: 8em
    ul, li
      float: none 
      a
        border-right-style: none 
        border-top-style: solid 
      li a 
        border-left-style: solid
      ul
        left: 100%
        top: 0 

              
            
!

JS

              
                
              
            
!
999px

Console