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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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 class="horizontalcssmenu">
<ul id="cssmenu1">
<li style="border-left: 1px solid #202020;">
	<a href="https://function-code.blogspot.com/">Memu 1</a></li>
<li><a href="https://function-code.blogspot.com/search/label/HTML">Menu 2</a></li>
<li><a href="https://function-code.blogspot.com/search/label/CSS">Menu 3</a></li>
<li><a href="https://function-code.blogspot.com/">Menu 4</a>
    <ul>
<li><a href="https://function-code.blogspot.com/">Submenu 4-1</a></li>
<li><a href="https://function-code.blogspot.com/">Submenu 4-2</a></li>
<li><a href="https://function-code.blogspot.com/">Submenu 4-3</a></li>
</ul>
</li>
<li><a href="https://function-code.blogspot.com/search/label/JavaScript">Menu 5</a></li>
<li><a href="https://function-code.blogspot.com/">Menu 6</a>
    <ul>
<li><a href="https://function-code.blogspot.com/">Submenu 6-1</a></li>
<li><a href="https://function-code.blogspot.com/">Submenu 6-2</a></li>
<li><a href="https://function-code.blogspot.com/">Submenu 6-3</a></li>
<li><a href="https://function-code.blogspot.com/">Submenu 6-4</a></li>
<li><a href="https://function-code.blogspot.com/">Submenu 6-5</a></li>
<li><a href="https://function-code.blogspot.com/">Submenu 6-6</a></li>
</ul>
</li>
</ul>
</div>
              
            
!

CSS

              
                .horizontalcssmenu ul{
margin: 0;
padding: 0;
list-style-type: none;
}
/*Top level list items*/
.horizontalcssmenu ul li{
margin: 0;
position: relative;
display: inline;
float: left;
}
/*Top level menu link items style*/
.horizontalcssmenu ul li a{
display: block;
width: 110px; /*Width of top level menu link items*/
padding: 2px 8px;
border: 1px solid #202020;
border-left-width: 0;
text-decoration: none;
background: url(menubg.gif) center center repeat-x;
color: black;
font: bold 13px Tahoma;
}
/*Sub level menu*/
.horizontalcssmenu ul li ul{
left: 0;
top: 0;
border-top: 1px solid #202020;
position: absolute;
display: block;
visibility: hidden;
z-index: 100;
}
/*Sub level menu list items*/
.horizontalcssmenu ul li ul li{
display: inline;
float: none;
}
/* Sub level menu links style */
.horizontalcssmenu ul li ul li a{
width: 160px; /*width of sub menu levels*/
font-weight: normal;
padding: 2px 5px;
background: #e3f1bd;
border-width: 0 1px 1px 1px;
}
.horizontalcssmenu ul li a:hover{
color:#000;
background: url(menubgover.gif) center center repeat-x;
}
.horizontalcssmenu ul li ul li a:hover{
color:#000;
background: #cde686;
}
.horizontalcssmenu .arrowdiv{
position: absolute;
right: 0;
background: transparent url(menuarrow.gif) no-repeat center left;
}
* html p#iepara{ /*For a paragraph (if any) that immediately follows menu, add 1em top spacing between the two in IE*/
padding-top: 1em;
}
              
            
!

JS

              
                var cssmenuids=["cssmenu1"] //Enter id(s) of CSS Horizontal UL menus, separated by commas
var csssubmenuoffset=-1 //Offset of submenus from main menu. Default is 0 pixels.

function createcssmenu2(){
for (var i=0; i < cssmenuids.length; i++){
  var ultags=document.getElementById(cssmenuids[i]).getElementsByTagName("ul")
    for (var t=0; t < ultags.length; t++){
	ultags[t].style.top=ultags[t].parentNode.offsetHeight+csssubmenuoffset+"px"
    	var spanref=document.createElement("span")
	spanref.className="arrowdiv"
	spanref.innerHTML="    "
	ultags[t].parentNode.getElementsByTagName("a")[0].appendChild(spanref)
    	
	ultags[t].parentNode.onmouseover=function(){
		this.style.zIndex=100
	    	this.getElementsByTagName("ul")[0].style.visibility="visible"
		this.getElementsByTagName("ul")[0].style.zIndex=0
    		}

    	ultags[t].parentNode.onmouseout=function(){
		this.style.zIndex=0
		this.getElementsByTagName("ul")[0].style.visibility="hidden"
		this.getElementsByTagName("ul")[0].style.zIndex=100
    		}
    }
  }
}

if (window.addEventListener)
window.addEventListener("load", createcssmenu2, false)
else if (window.attachEvent)
window.attachEvent("onload", createcssmenu2)
              
            
!
999px

Console