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.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                <nav class="nav-primary" id="nav-primary"> <a href="/" class="float-left"><img src="http:/-logo.svg" "="" width="255" alt="logo" class="logo"></a>

<div class="menu-main-menu-container">
  
  <ul id="menu-main-menu" class="menu"><li id="menu-item-392" class="txtxtx menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-392"><a rel="fancybox" class="softwareicon" href="http://www.drivew">Products</a>
  
<ul class="sub-menu">
	<li id="menu-item-8966" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8966"><a href="kspro/">Pro</a></li>
	<li id="menu-item-8967" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8967"><a href="s/drorksolo/"> Solo</a></li>
	<li id="menu-item-8968" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8968"><a href="s/drkpress/">s Xpress</a></li>
	<li id="menu-item-8970" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8970"><a href="/desmation/">Design Au</a></li>
	<li id="menu-item-8971" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8971"><a href="http://www.spro/sales-configurator/">Saltor</a></li>
	<li id="menu-item-8991" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8991"><a href="oducts/compare/">Compare</a></li>
</ul>
</li>
  
  
<li id="menu-item-1653" class="softwareicon menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-1653"><a href="o.uk/explore/">Explore</a>
  
<ul class="sub-menu">
	<li id="menu-item-8969" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8969"><a href="dustrial-showcase/">Industry Showcase</a></li>
	<li id="menu-item-8990" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8990"><a href=".3-minute-tour/">3 Minute Tour</a></li>
</ul>
</li>
  
<li id="menu-item-433" class="softwareicon menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-433"><a href="k/community/">Community</a>
<ul class="sub-menu">
	<li id="menu-item-8988" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8988"><a href="kspro/account/">s Account</a></li>
	<li id="menu-item-8987" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8987"><a href="s.co.uk/blog/">s Blog</a></li>
</ul>
</li>
<li id="menu-item-8965" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-8965"><a href="tact-us/">Contact Us</a>
<ul class="sub-menu">
	<li id="menu-item-5542" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-5542"><a href="veworks/">About Us</a></li>
	<li id="menu-item-2066" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2066"><a href="elp/">Help</a></li>
	<li id="menu-item-8989" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8989"><a href="s/help-file/">ks Solo Online Help file</a></li>
</ul>
</li>
<li id="menu-item-8992" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-8992"><a href="ers/">Reseller</a>
<ul class="sub-menu">
	<li id="menu-item-8993" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8993"><a href="ia/">R – Asia Pacific</a></li>
	<li id="menu-item-8994" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8994"><a href="urope/">sellers – Europe</a></li>
	<li id="menu-item-8995" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8995"><a href="http://wwco.uke-east-africa/"> Re – Middle East / Africa</a></li>
	<li id="menu-item-8996" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8996"><a href="http://erica/"> Resellers – North America</a></li>
	<li id="menu-item-8997" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8997"><a href="th-aerica/"> R South America</a></li>
	<li id="menu-item-8998" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8998"><a href="-kingdom/">R – United Kingdom</a></li>
</ul>
</li>
</ul></div>  

</nav>
              
            
!

CSS

              
                
.content-container {
	display: inline-block;
}

.center {
	margin-left: auto;
	margin-right: auto;
}
.product-related-img {
	display: block;
	border-radius: 3px 3px 0 0;
}
.event-title {
	text-align: left;
	font-size: 18px;
	font-weight: 400;
	padding-top: 10px;
}
.pad-left {
	padding-left: 15px;
	padding-right: 5px;
}
.event-date {
	font-size: 16px;
	font-weight: 800;
	padding-bottom: 9px;
	padding-left: 10px;
	padding-right: 15px;
}
.event-table-cont {
	width: 100%;
}
p, ul, il {
	vertical-align: baseline;
	-webkit-text-size-adjust: 100%;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}
u {
	padding-left: 18px;
}
.wpb_tabs_nav {
	margin: 0px;
}
img {
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
}
#top-nav {
	background: black;
	position: fixed;
	z-index: 9999;
	width: 100%;
}
#top-nav a {
	color: white;
	font-size: 13px;
}
.login {
	margin: 0;
	padding: 0;
}
li.community, .login {
	display: inline;
	background: rgb(216, 69, 71);
	padding: 2px 5px 2px 5px;
}
.contact {
	display: inline;
}

#sub-menu {
	height: 100%;
	width: 100%;
	margin: 0px;
	padding: 0px;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}
#sub-menu li {
	display: inline-block;
	white-space: nowrap;
	margin: 0px;
	padding: 0px;
	width: 32%;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	text-align: center;
}
img, object, embed, video {
	max-width: 100%;
}
.product {
	border: 1px solid #e4e4e4;
	border-radius: 3px;
	padding: 20px;
}
.product:hover {
	-webkit-box-shadow: 0 10px 6px -6px #777;
	-moz-box-shadow: 0 10px 6px -6px #777;
	box-shadow: 0 10px 6px -6px #777;
}
figure {
	margin: 0;
	position: relative;
	overflow: hidden;
	border: 1px solid #f1f1f1;
}
#subnavwrapper li:hover {
	background: #3a3a3a;
}
#subnavwrapper a:hover {
	color: white;
}
figure:hover figcaption, .cs-style-3 figure.cs-hover figcaption {
	opacity: 1;
	transform: translateY(0px);
	transition: transform 0.4s, opacity 0.1s;
}
.related_singular {
	border-radius: 5px;
	-webkit-box-shadow: 1px 1px 2px 0 #d0d0d0;
	box-shadow: 1px 1px 2px 0 #d0d0d0;
}
.slider {
	clear: both;
	width: 100%;
	height: auto;
	display: block;
	position: relative;
	overflow: hidden;
	clear: fix;
}
figcaption h3 {
	margin: 0;
	padding: 0;
	color: #fff;
}
figcaption span:before {
	content: 'by ';
}
figcaption a {
	text-align: center;
	padding: 5px 10px;
	border-radius: 2px;
	display: inline-block;
	background: #db4146;
	color: #fff;
}
.bb-link p, .banner-block p {
	margin: 0;
}
.breadcrumb__t {
	padding: 10px 0 0 0;
	margin: 0;
	word-wrap: break-word;
	-webkit-hyphens: auto;
	-moz-hyphens: auto;
	-ms-hyphens: auto;
	-o-hyphens: auto;
	hyphens: auto;
}
.breadcrumb__t li {
	display: inline;
}
.breadcrumb__t li.active {
	background: none;
}
.breadcrumb__t li.divider {
	font: 0/0 a;
	color: transparent;
	text-shadow: none;
	background-color: transparent;
	border: 0;
}
.breadcrumb__t li.divider:after {
	content: ' / ';
	color: #333333;
	font: 12px/18px Arial, Helvetica, sans-serif;
}
.center {
	display: block;
	text-align: center;
}
.centDiv {
	margin: 0 auto;
	text-align: center;
}
.border {
	border: solid #dfdfdf;
	border-width: 0 1px 1px 0;
}
#fullWidthWrapper {
	position: relative;
	background: white;
	width: 100%;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	background-color: #fff;
	-webkit-box-shadow: 0 3px #e3e4e8;
	-moz-box-shadow: 0 3px #e3e4e8;
	box-shadow: 0 3px #e3e4e8;
	padding: 32px 9px 19px 25px;
	margin: 10px 0px 0px 0px;
}
div#footer ul {
	padding-left: 0em;
	list-style-type: none !important;
}
div#subnavwrapper ul {
	padding-left: 0em;
	list-style-type: none !important;
	background: black;
}
.shadow {
	-webkit-box-shadow: 10px 10px 20px #ccc;
	box-shadow: 10px 10px 20px #ccc;
}




















/* Responsive Navigation Menu - Common */ 

.page-content, .mobile-helper-bar {
	float: right;
	width: 100%;
	-moz-transition: 0.3s;
	-o-transition: 0.3s;
	-webkit-transition: 0.3s;
	transition: 0.3s;
	background-color: rgb(83, 90, 97);
	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
	filter: alpha(opacity=80);
	-khtml-opacity: 0.9;
	-moz-opacity: 0.9;
	opacity: 0.9;
}
.off-canvas-show ~ .page-content {
	overflow: hidden;
	-moz-transform: translateX(8rem);
	-ms-transform: translateX(8rem);
	-webkit-transform: translateX(8rem);
	transform: translateX(8rem);
}
.off-canvas-show ~ .mobile-helper-bar {
	overflow: hidden;
	-moz-transform: translateX(20rem);
	-ms-transform: translateX(20rem);
	-webkit-transform: translateX(20rem);
	transform: translateX(20rem);
}
.mobile-helper-bar {
	position: fixed;
	z-index: 9999999999999999999999999999999999999;
 padding: .5rem 1rem;
}
.nav-primary li {
	display: block;
// padding: .5rem 0;
	list-style: none;
}

.nav-primary a:hover {
	background-color: #D84547;
	z-index: -999;
	color: white;
}
.nav-primary a {
	color: #fff;
	text-decoration: none;
	display: block;
}
.off-canvas-show {
	box-shadow: 0 0 5px #000;
}
.page-content {
	padding: 3rem 1rem;
	box-sizing: border-box;
}
.page-content {
	padding: 3rem;
}
.mobile-helper-bar button {
	color: #fff;
}
/*  ==========================================================================

    ========================================================================== */

.nav-primary {
	border-top: 4px solid #D84547;
	position: fixed;
	z-index: 99999999999;
	overflow-y: auto;
	width: 16rem;
	-moz-transform: translateX(-20rem);
	-ms-transform: translateX(-20rem);
	-webkit-transform: translateX(-20rem);
	transform: translateX(-20rem);
	height: 100%;
}
.nav-primary.off-canvas-show {
	-moz-transform: translateX(0);
	-ms-transform: translateX(0);
	-webkit-transform: translateX(0);
	transform: translateX(0);
	background: #1d1d20;
	color: #eee;
	width: 320px;
}
.mobile-helper-bar {
	position: relative;
	border-top: 4px solid #d93739;
}
#nav-toggle {
	cursor: pointer;
	padding: 10px 35px 16px 0px;
}
#nav-toggle span, #nav-toggle span:before, #nav-toggle span:after {
	cursor: pointer;
	border-radius: 20px;
	height: 3px;
	width: 25px;
	background: white;
	position: absolute;
	display: block;
	content: '';
}
#nav-toggle span:before {
	top: -8px;
}
#nav-toggle span:after {
	bottom: -8px;
}
#nav-toggle span, #nav-toggle span:before, #nav-toggle span:after {
	transition: all 500ms ease-in-out;
}
#nav-toggle.active span {
	background-color: transparent;
}
#nav-toggle.active span:before, #nav-toggle.active span:after {
	top: 0;
}
#nav-toggle.active span:before {
	transform: rotate(45deg);
}
#nav-toggle.active span:after {
	transform: rotate(-45deg);
}
#menuwrap {
	float: left;
	width: 100%;
	margin: 0;
	padding: 0;
	position: absolute;
	top: 0;
	left: 0;
}
#menu {
	margin: 0 0 0 256px;
	float: right;
}
#progress {
	position: fixed;
	z-index: 2147483647;
	top: 0;
	left: -6px;
	width: 1%;
	height: 4px;
	background: #1d529e;
	-moz-border-radius: 1px;
	-webkit-border-radius: 1px;
	border-radius: 1px;
	-moz-transition: width 500ms ease-out, opacity 400ms linear;
	-ms-transition: width 500ms ease-out, opacity 400ms linear;
	-o-transition: width 500ms ease-out, opacity 400ms linear;
	-webkit-transition: width 500ms ease-out, opacity 400ms linear;
	transition: width 500ms ease-out, opacity 400ms linear;
}
#progress dd, #progress dt {
	position: absolute;
	top: 0;
	height: 4px;
	-moz-box-shadow: #0088CC 1px 0 6px 1px;
	-ms-box-shadow: #0088CC 1px 0 6px 1px;
	-webkit-box-shadow: #0088CC 1px 0 6px 1px;
	box-shadow: #0088CC 1px 0 6px 1px;
	-moz-border-radius: 100%;
	-webkit-border-radius: 100%;
	border-radius: 100%;
}
#progress dt {
	opacity: .4;
	width: 180px;
	right: -80px;
	clip: rect(-6px, 90px, 14px, -6px);
}
#progress dd {
	opacity: .4;
	width: 20px;
	right: 0;
	clip: rect(-6px, 22px, 14px, 10px);
}
 @media screen and (min-width: 925px) {
.nav-primary {
	display: block;
	margin: 0;
	padding: 0;
	width: 100%;
	-moz-transform: translateX(0);
	-ms-transform: translateX(0);
	-webkit-transform: translateX(0);
	transform: translateX(0);
	height: 93px;
	overflow: visible;
	background-color: rgb(83, 90, 97);
	color: #eee;
}
#top-bar {
	height: 115px;
}
.menu-main-menu-container {
	display: inline;
	float: right;
}
.logo {
	margin: 12px 0 0 10px;
	position: absolute;
	left: 10%;
}
.float-left {
	float: left;
}
.nav-primary ul {
	text-align: center;
}
ul.sub-menu li a {
	height: 40px;
}

.nav-primary li {
	display: inline-block;
	vertical-align: top;
	width: 120px;
}

.nav-primary li:hover{
	background: rgb(216, 69, 71);
	
}
ul.sub-menu li {
	line-height: 35px;
}
.nav-primary a {
	height: 89px;
}
.sub-menu {
	background: #F7B6B6;
	padding: 28px 27px 4px;
	position: absolute;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	width: 100%;
	left: 0;
	height: 320px;
}
.mobile-helper-bar {
	display: none;
}
ul#menu-main-menu-2 {
	float: right;
}
ul.sub-menu {
  display: none;
	background-color: #C0C0C0;
	font-size: 10px;
	margin-left:0;
	background-color: #D84547;
}
   
#menu-main-menu{
  padding:0;
  margin:0;
}






              
            
!

JS

              
                jQuery(function($) {
 $("#menu-main-menu").find('li').hover(function(){$(this).click();}).click(
 function(){
	 
	 var visibleMenu = $("ul.sub-menu:visible");
	 if (visibleMenu) {
		$(visibleMenu).hide(); }
	
	$('ul.sub-menu', this).slideDown();
	
	$("#menu-main-menu").mouseleave(function(){
    $("ul.sub-menu").hide(); 
  });
}

);
})
              
            
!
999px
There are 10 kinds of people, those who understand binary and those who don’t.

Console