cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <header>
		<div class="wrap">
			<nav>
				<ul>
				  <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>
				</ul>
			</nav>
		</div>
	</header>
	
            
          
!
            
              /*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; 
  margin:0; 
  border-right:1px solid #57a7dd; 
  border-left:1px solid #1a70b2;
  color:#fff; 
  float:left; 
  display:block; 
  height:71px;
}

/*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 {
	border-right:0;
}
	
/*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; 
  padding-top:23px; 
  position:relative;
}
		
/*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; 
  display:block; 
  position:absolute; 
  bottom:-1px; 
  content:''; 
  left:50%;
}
		
/*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; 
  display:block; 
  position:absolute; 
  bottom:-1px; 
  content:''; 
  left:49%;
}



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

header {
		clear:both;
  	width:100%; 
  	float:left; 
  	margin:0; 
	  color:#fff;
  	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; 
     margin:0; 
     position:relative;
}
	
/*Centering*/
.wrap {
	margin:0 auto; 
  max-width:1000px;
}
ul, li {margin:0;padding:0;list-style:none;}
/*
Alignment*/
		li {float:left;}
            
          
!
999px
Loading ..................

Console