"Bootstrap Navbar Cart Dropdown"
Bootstrap 3.3.0 Snippet by mmoraes

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.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" role="button" aria-expanded="false"> <span class="glyphicon glyphicon-shopping-cart"></span> 7 - Items<span class="caret"></span></a> <ul class="dropdown-menu dropdown-cart" role="menu"> <li> <span class="item"> <span class="item-left"> <img src="http://lorempixel.com/50/50/" alt="" /> <span class="item-info"> <span>Item name</span> <span>23$</span> </span> </span> <span class="item-right"> <button class="btn btn-xs btn-danger pull-right">x</button> </span> </span> </li> <li> <span class="item"> <span class="item-left"> <img src="http://lorempixel.com/50/50/" alt="" /> <span class="item-info"> <span>Item name</span> <span>23$</span> </span> </span> <span class="item-right"> <button class="btn btn-xs btn-danger pull-right">x</button> </span> </span> </li> <li> <span class="item"> <span class="item-left"> <img src="http://lorempixel.com/50/50/" alt="" /> <span class="item-info"> <span>Item name</span> <span>23$</span> </span> </span> <span class="item-right"> <button class="btn btn-xs btn-danger pull-right">x</button> </span> </span> </li> <li> <span class="item"> <span class="item-left"> <img src="http://lorempixel.com/50/50/" alt="" /> <span class="item-info"> <span>Item name</span> <span>23$</span> </span> </span> <span class="item-right"> <button class="btn btn-xs btn-danger pull-right">x</button> </span> </span> </li> <li class="divider"></li> <li><a class="text-center" href="">View Cart</a></li> </ul> </li> </ul>
ul.dropdown-cart{ min-width:250px; } ul.dropdown-cart li .item{ display:block; padding:3px 10px; margin: 3px 0; } ul.dropdown-cart li .item:hover{ background-color:#f3f3f3; } ul.dropdown-cart li .item:after{ visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; } ul.dropdown-cart li .item-left{ float:left; } ul.dropdown-cart li .item-left img, ul.dropdown-cart li .item-left span.item-info{ float:left; } ul.dropdown-cart li .item-left span.item-info{ margin-left:10px; } ul.dropdown-cart li .item-left span.item-info span{ display:block; } ul.dropdown-cart li .item-right{ float:right; } ul.dropdown-cart li .item-right button{ margin-top:14px; }

Related: See More


Questions / Comments: