cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              
  
  <ul id="nav">
    <li>
      <a href="javascript:void(0);">art</a>
    </li>
    <li>
      <a href="javascript:void(0);">archive</a>
    </li>
    <li>
      <a href="javascript:void(0);">about</a>
    </li>
     <li>
      <a href="javascript:void(0);">blog</a>
    </li>
    <li class="active">
      <a href="javascript:void(0);">contact</a>
    </li>
       </ul>
  
  
  
  

            
          
!
            
              body{background:#f9d867; margin:0; padding:0;}
#nav{display:block; background:#f5f5f5;  
  -moz-box-shadow:    0 0 4px 0px #999;
  -webkit-box-shadow: 0 0 4px 0px #999;
  box-shadow:         0 0 4px 0px #999; margin:0; padding:40px 20px; list-style:none; text-align:center; }
#nav li{display:inline-block;}
#nav li a{display:block; padding:10px 15px; font:1em "Arial Black", Gadget, sans-serif; color:#444; text-decoration:none; text-transform:uppercase;}
#nav li a:hover{color:#999;}
#nav li.active a{background:#fff; 
  -moz-box-shadow:    5px 5px 0px 0px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 5px 5px 0px 0px rgba(0, 0, 0, 0.1);
  box-shadow:        5px 5px 0px 0px rgba(0, 0, 0, 0.1);}
            
          
!
            
              $(function(){
  $('#nav a').on('click',function(){
     $('#nav li').removeClass('active');
     $(this).parent().addClass('active');
  });
});
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console