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

              
                <nav class="horizontal-menu plain">
	<ul>
		<li class="active"><a href='#'>Link</a></li>
		<li><a href='#'>Link</a></li>
		<li><a href='#'>Link</a></li>
		<li><a href='#'>Link</a></li>
		<li><a href='#'>Link</a></li>
		<li><a href='#'>Link</a></li>
	</ul>
</nav>

<nav class="horizontal-menu dropdown">
	<ul>
		<li class="active">
			<a>Item 1</a>
			<div>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
			</div>
		</li>
		<li>
			<a>Item 2</a>
			<div>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
			</div>
		</li>
		<li>
			<a>Item 3</a>
			<div>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
			</div>
		</li>
		<li>
			<a>Item 4</a>
			<div>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
			</div>
		</li>
		<li>
			<a>Item 5</a>
			<div>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
				<a>Link</a>
			</div>
		</li>
		<li>
			<a>Item 6</a>
			<div>
				<a>Link 1</a>
				<a>Link 2</a>
				<a>Link 3</a>
				<a>Link 4</a>
				<a>Link 5</a>
				<a>Link 6</a>
			</div>
		</li>
	</ul>
</nav>
              
            
!

CSS

              
                /******************************
	      Boilerplate Css
******************************/

* {
	box-sizing: border-box;
	margin: 0px;
	padding: 0px;
}

html {
	height: 100%;
}

body {
	background: #191919;
	color: #404040;
	font: 12px/1.4 Arial;
	min-width: 1300px;
	position: relative;
}

a {
	color: #bebebe;
	text-decoration: none;
}

ul {
	list-style: none;
}


/******************************
	  Navigation Menu
******************************/

.horizontal-menu {
	background-color: #2c2d2f;
	color: #BEBEBE;
	display: block;
	height: 50px;
	margin: 20px auto;
	max-width: 1100px;
}


/******************************
					Globals
******************************/

.horizontal-menu.plain,
.horizontal-menu.dropdown {
	display: block;
}

.horizontal-menu.plain li,
.horizontal-menu.dropdown li {
	float: left;
	height: 100%;
	width: 16.6666%;
}

.horizontal-menu.plain li a,
.horizontal-menu.dropdown li > a {
	display: block;
	height: 100%;
	line-height: 50px;
	text-align: center;
	transition: background-position 0.2s ease 0s;
}

.horizontal-menu.plain li a,
.horizontal-menu.dropdown li > div > a {
	transition: background-position 0.1s ease 0s;
}

.horizontal-menu.plain li:not(.active):hover a,
.horizontal-menu.dropdown li > div > a:hover {
	color: #FFF;
	background-position: 100% 0;
}

.horizontal-menu.plain li.active a:active,
.horizontal-menu.dropdown > div:not(.active):hover > a:active {
	background: #BA3032;
	color: #FFF;
}


/******************************
    Plain Horizontal Menu
******************************/

.horizontal-menu.plain li a {
	background: #2c2d2f linear-gradient(to left, #3B3D3F 50%, #2c2d2f 50%) repeat scroll 0 0 / 200% 100%;
}

.horizontal-menu.plain li.active a {
	background: #DB3839;
	color: #FFF;
}


/******************************
Horizontal Menu With Dropdowns
******************************/

.horizontal-menu.dropdown li,
.horizontal-menu.dropdown li > a {
	transition: background-color 0.2s ease;
}

.horizontal-menu.dropdown li {
	position: relative;
}

.horizontal-menu.dropdown li > a {
	text-transform: uppercase;
}

.horizontal-menu.dropdown li > div {
	background: #2C2D2F;
	display: none;
	min-width: 200%;
	overflow: hidden;
	position: absolute;
	padding: 10px;
	z-index: 999;
}

.horizontal-menu.dropdown li:not(:first-of-type):not(:last-of-type) > div {
	left: -50%;
	border-radius: 0 0 3px 3px;
}

.horizontal-menu.dropdown li:first-of-type > div {
	left: 0;
	border-radius: 0 0 3px 0;
}

.horizontal-menu.dropdown li:last-of-type > div {
	right: 0;
	border-radius: 0 0 0 3px;
}

.horizontal-menu.dropdown li:hover > div {
	display: block;
}

.horizontal-menu.dropdown li:hover,
.horizontal-menu.dropdown li:hover > div {
	background: #3B3D3F;
}

.horizontal-menu.dropdown li > div > a {
	background: #2c2d2f linear-gradient(to left, #DB3839 50%, #2c2d2f 50%) repeat scroll 0 0 / 200% 100%;
	border-radius: 2px;
	display: block;
	float: left;
	margin: 2%;
	padding: 8px 10px;
	text-align: center;
	transition: background-position 0.2s ease;
	width: 46%;
}

.horizontal-menu.dropdown li > div > a:hover {
	background-position: 100% 0;
	cursor: pointer;
}
              
            
!

JS

              
                
              
            
!
999px

Console