"Dropdown Menu UI - Less HTML"
Bootstrap 3.1.0 Snippet by Geniusone

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <ul class="nav navbar-nav"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Iasmani Pinazo <span class="glyphicon glyphicon-user pull-right"></span></a> <ul class="dropdown-menu"> <li><a href="#">Account Settings <span class="glyphicon glyphicon-cog pull-right"></span></a></li> <li><a href="#">User stats <span class="glyphicon glyphicon-stats pull-right"></span></a></li> <li><a href="#">Messages <span class="badge pull-right"> 42 </span></a></li> <li><a href="#">Favourites Snippets <span class="glyphicon glyphicon-heart pull-right"></span></a></li> <li><a href="#">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; } /* LESS HTML THIS WAY */ .dropdown-menu { padding: 0px !important; } .dropdown-menu>li>a { padding: 9px 20px; } .dropdown-menu>li { border-bottom: 1px solid rgb(229, 229, 229); } .dropdown-menu>li:first-child>a { border-top-left-radius: 4px; border-top-right-radius: 4px; } .dropdown-menu>li:last-child { border-bottom: 0px solid rgb(229, 229, 229); } .dropdown-menu>li:last-child>a { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; }

Related: See More


Questions / Comments: