CodePen

HTML

            
              <div class="header-wrap">
  <header class="main">
    <div class="nav-wrap">   
      <ul class="group" id="fancy-nav">
        <li class="current_page_item"><a rel="#038680" href="#">Home</a></li>
        <li><a rel="#038680" href="#">Interviews</a></li>
        <li><a rel="#038680" href="#">Blogs</a></li>
        <li><a rel="#038680" href="#">About</a></li>
        <li><a rel="#038680" href="#">Contact</a></li>
      </ul>
    </div>
  </header>
</div>
            
          
!
via HTML Inspector

CSS

            
              .header-wrap {
  overflow: hidden;
  background-color: #252625;
  border-bottom: 0.25em solid #038680;
}
header.main {
  padding: 0.75em 0.75em 1.8em 0.75em;
  width: 90%;
  margin: 0 auto;
  color: #fff;
}
.nav-wrap {
  float: right;
}		
#fancy-nav { 
  float: right;
  position: relative;
  margin: 0;
}
#fancy-nav li { 
  display: inline-block; 
  padding: 0 0.75em;
}
#fancy-nav li a { 
  position: relative; 
  z-index: 200; 
  color: #bbb; 
  font-size: 0.8em; 
  display: block; 
  float: left; 
  text-decoration: none;
  text-transform: uppercase; 
  padding: 0.8em 0.3em 0.2em 0.2em;
}
#fancy-nav li a:hover { 
  color: white; 
}
#fancy-nav #magic-line { 
  position: absolute; 
  top: 0;
  height: 35px;
  background: #038680;
  -moz-border-radius-topleft: : 5px;
  -moz-border-radius-topright: : 5px;
  -webkit-border-top-left-radius: 5px;
  -webkit-border-top-right-radius: 5px;
  border-radius: 5px 5px 0 0;
}
#fancy-nav li.current_page_item a { 
  color: white; 
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              /*
 * http://css-tricks.com/forums/discussion/24993/help-with-jquery-magicline-navigation
 */

$(function() {
  
  var $el, leftPos, newWidth,
      $mainNav = $("#fancy-nav");
  
  $mainNav.append("<li id='magic-line'></li>");
  var $magicLine = $("#magic-line");
  
  $magicLine
    .width($(".current_page_item").width())
    .css("left", $(".current_page_item").position().left)
    .data("origLeft", $magicLine.position().left)
    .data("origWidth", $magicLine.width());
  
  $("#fancy-nav li").hover(function() {
    $el = $(this);
    leftPos = $el.position().left;
    newWidth = $el.width();
    $magicLine.stop().animate({
      left: leftPos,
      width: newWidth
    });
  }, function() {
    $magicLine.stop().animate({
      left: $magicLine.data("origLeft"),
      width: $magicLine.data("origWidth")
    });    
  });
});
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................