css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

		<div class="wrap">
				  <li><a href="#">Item One</a></li>
				  <li class="active"><a href="#">Item Two</a></li>
          <li><a href="#">Item Three</a></li>
          <li><a href="#">Item Four</a></li>
              /*Triangle indicator with faux "border" using :before and :after*/
/*No wonky math*/
* {
	-moz-box-sizing: border-box; 
  -webkit-box-sizing: border-box; 
  box-sizing: border-box;

/*All the interesting stuff starts below here*/

/*The specificity of the selector is important here as there are several levels of menus, and I only want this applied to the very top level links. The thing that is important here is that you set your links to display a block level elements float them to the left. */
header nav > ul > li > a {
  padding:25px 50px; 
  border-right:1px solid #57a7dd; 
  border-left:1px solid #1a70b2;

/*Using box shadows to create a double border to the right of the first menu item */
header nav > ul > li:first-child > a {
	box-shadow:-1px 0 0 0 rgba(86, 165, 220, 1);

/*That last item doesn't need a border*/
header nav > ul > li:last-child > a {
/*Important item here is the relative positioning for our active menu item. We are creating a container for our arrows, which are going to be absolutely positioned. This will keep them within the bounds of the item*/
nav li.active > a {
	border-top:3px solid #fff; 
/*Our top arrow. This is the same color as the background of the page below it.*/
nav li.active > a:after {
	width: 0; 
  height: 0;  
  border-left: 8px solid transparent; 
  border-right: 8px solid transparent; 
  border-bottom: 8px solid #434444; 
/*Our bottom arrow. This is the darker color, that connects to the black border along the bottom of the blue menu area. This triangle needs to have at least a border width at least 2px greated than the top triangle to give the border/shadow illusion.*/
nav li.active > a:before {
	width: 0; 
  height: 0;  
  border-left: 10px solid transparent; 
  border-right: 10px solid transparent; 
  border-bottom:10px solid #000; 

/*Style stuff below, ignore*/
body {
     font:1.1rem helvetica, arial, sans-serif; 	
a {text-decoration: none;}

header {
  	background: #2291d5; 
  	background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzIyOTFkNSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUxJSIgc3RvcC1jb2xvcj0iIzIxOGNkMyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUxJSIgc3RvcC1jb2xvcj0iIzBiN2RjZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwYTc2Y2IiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
     background: -moz-linear-gradient(top,  #2291d5 0%, #218cd3 51%, #0b7dcf 51%, #0a76cb 100%); /* FF3.6+ */
  	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2291d5), color-stop(51%,#218cd3), color-stop(51%,#0b7dcf), color-stop(100%,#0a76cb)); /* Chrome,Safari4+ */
     background: -webkit-linear-gradient(top,  #2291d5 0%,#218cd3 51%,#0b7dcf 51%,#0a76cb 100%); /* Chrome10+,Safari5.1+ */
     background: -o-linear-gradient(top,  #2291d5 0%,#218cd3 51%,#0b7dcf 51%,#0a76cb 100%); /* Opera 11.10+ */
     background: -ms-linear-gradient(top,  #2291d5 0%,#218cd3 51%,#0b7dcf 51%,#0a76cb 100%); /* IE10+ */
     background: linear-gradient(to bottom,  #2291d5 0%,#218cd3 51%,#0b7dcf 51%,#0a76cb 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2291d5', endColorstr='#0a76cb',GradientType=0 ); /* IE6-8 */ 
     border-bottom:1px solid #000; 
.wrap {
	margin:0 auto; 
ul, li {margin:0;padding:0;list-style:none;}
		li {float:left;}
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................