Bootstrap Fancy Dropdown Menu


<ul class="nav navbar-nav">
<li class="dropdown">
  <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">John Snow<span class="glyphicon glyphicon-user pull-right"></span></a>
  <ul class="dropdown-menu">
    <li><a href="javascript:;">Account Settings <span class="glyphicon glyphicon-cog pull-right"></span></a></li>
    <li class="divider"></li>
    <li><a href="javascript:;">User stats <span class="glyphicon glyphicon-stats pull-right"></span></a></li>
    <li class="divider"></li>
    <li><a href="javascript:;">Messages <span class="badge pull-right"> 42 </span></a></li>
    <li class="divider"></li>
    <li><a href="javascript:;">Favourites Snippets <span class="glyphicon glyphicon-heart pull-right"></span></a></li>
    <li class="divider"></li>
    <li><a href="javascript:;">Sign Out <span class="glyphicon glyphicon-log-out pull-right"></span></a></li>
  </ul>
</li>
</ul>

    body {
    background:#f0f0f0;
}
.nav {
    left:50%;
    margin-left:-150px;
    top:50px;
    position:absolute;
}
.nav>li>a:hover, .nav>li>a:focus, .nav .open>a, .nav .open>a:hover, .nav .open>a:focus {
    background:#fff;
}
.dropdown {
    background:#fff;
    border:1px solid #ccc;
    border-radius:4px;
    width:300px;    
}
.dropdown-menu>li>a {
    color:#428bca;
}
.dropdown ul.dropdown-menu {
    border-radius:4px;
    box-shadow:none;
    margin-top:20px;
    width:300px;
}
.dropdown ul.dropdown-menu:before {
    content: "";
    border-bottom: 10px solid #fff;
    border-right: 10px solid transparent;
    border-left: 10px solid transparent;
    position: absolute;
    top: -10px;
    right: 16px;
    z-index: 10;
}
.dropdown ul.dropdown-menu:after {
    content: "";
    border-bottom: 12px solid #ccc;
    border-right: 12px solid transparent;
    border-left: 12px solid transparent;
    position: absolute;
    top: -12px;
    right: 14px;
    z-index: 9;
}