I use this plugin here: link
Follow JSFiddle: link
Follow the full CSS: link
See the code:
.notifications {
list-style: none;
padding: 0; }
.notification {
display: block;
padding: 0.8em;
border-width: 0 0 1px 0;
border-style: solid;
border-color: #e9ecef;
background-color: #ffffff;
color: #212529;
text-decoration: none; }
.notification:last-child {
border-bottom: 0;
border-radius: 0 0 0.25rem 0.25rem; }
.notification:hover, .notification.active:hover {
background-color: #f9f9f9;
border-color: #dee2e6;
text-decoration: none; }
.notification.active {
background-color: #efefef; }
.notification-title {
font-size: 1em;
margin-bottom: 0; }
.notification-desc {
margin-bottom: 0;
font-size: 0.94em; }
.notification-meta {
color: #868e96; }
.dropdown-notifications > .dropdown-container,
.dropdown-notifications > .dropdown-menu {
width: 450px;
max-width: 450px; }
.dropdown-notifications > .dropdown-container {
margin-top: 0.6rem; }
.dropdown-notifications .dropdown-menu {
padding: 0; }
.dropdown-notifications .dropdown-toolbar,
.dropdown-notifications .dropdown-footer {
padding: 0.8em; }
.dropdown-notifications .dropdown-toolbar {
background: #ffffff; }
.dropdown-notifications .dropdown-footer {
background: #ced4da; }
.dropdown-notifications .dropdown-toggle::after {
display: none; }
.navbar .dropdown-notifications .dropdown-menu {
position: static; }
.notification-icon {
margin-right: 0.49125rem;
vertical-align: middle;
font-style: normal;
}
.notification-icon:after {
position: absolute;
content: attr(data-count);
margin-left: -0.49125rem;
margin-top: -0.49125rem;
padding: 0 4px;
min-width: 0.9825rem;
height: 0.9825rem;
line-height: 0.9825rem;
background: red;
border-radius: 10px;
color: #ffffff;
text-align: center;
vertical-align: middle;
font-size: 0.786rem;
font-weight: 600;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; }
.notification .media-body {
padding-top: 0; }
.btn-lg .notification-icon:after {
margin-left: -0.5895rem;
margin-top: -0.5895rem;
min-width: 1.179rem;
height: 1.179rem;
line-height: 1.179rem;
font-size: 0.9825rem; }
.btn-xs .notification-icon:after {
content: '';
margin-left: -0.29475rem;
margin-top: -0.147375rem;
min-width: 0.4465909091rem;
height: 0.4465909091rem;
line-height: 0.4465909091rem;
padding: 0; }
.btn-xs .notification-icon {
margin-right: 0.245625rem; }
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script><linkhref="https://cdnjs.cloudflare.com/ajax/libs/open-iconic/1.1.1/font/css/open-iconic-bootstrap.css" rel="stylesheet"/>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">Tasks</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item dropdown dropdown-notifications open">
<a href="#notifications-panel" class="nav-link dropdown-toggle" data-toggle="dropdown">
<i data-count="2" class="oi oi-bell notification-icon" aria-label="Nofitication centre"></i>
</a>
<div class="dropdown-container">
<div class="dropdown-toolbar">
<div class="dropdown-toolbar-actions">
<a href="#"><i class="glyphicon glyphicon-search"></i> View All</a>
</div>
<h3 class="dropdown-toolbar-title">Recent (3)</h3>
</div><!-- /dropdown-toolbar -->
<ul class="dropdown-menu notifications">
<li class="notification">
<div class="media">
<img data-src="holder.js/50x50?bg=cccccc" class="mr-2 img-circle" alt="50x50" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2250%22%20height%3D%2250%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2050%2050%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_163b3713d4b%20text%20%7B%20fill%3A%23919191%3Bfont-weight%3Abold%3Bfont-family%3AArial%2C%20Helvetica%2C%20Open%20Sans%2C%20sans-serif%2C%20monospace%3Bfont-size%3A10pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_163b3713d4b%22%3E%3Crect%20width%3D%2250%22%20height%3D%2250%22%20fill%3D%22%23cccccc%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%226.4765625%22%20y%3D%2229.55625%22%3E50x50%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" data-holder-rendered="true" style="width: 50px; height: 50px;">
<div class="media-body">
<strong class="notification-title"><a href="#">Dave Lister</a> commented on <a href="#">DWARF-13 - Maintenance</a></strong>
<p class="notification-desc">I totally don't wanna do it. Rimmer can do it.</p>
<div class="notification-meta">
<small class="timestamp">27. 11. 2015, 15:00</small>
</div>
</div>
</div>
</li>
<li class="notification">
<div class="media">
<img data-src="holder.js/50x50?bg=cccccc" class="mr-2 img-circle" alt="50x50" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2250%22%20height%3D%2250%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2050%2050%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_163b3713d4c%20text%20%7B%20fill%3A%23919191%3Bfont-weight%3Abold%3Bfont-family%3AArial%2C%20Helvetica%2C%20Open%20Sans%2C%20sans-serif%2C%20monospace%3Bfont-size%3A10pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_163b3713d4c%22%3E%3Crect%20width%3D%2250%22%20height%3D%2250%22%20fill%3D%22%23cccccc%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%226.4765625%22%20y%3D%2229.55625%22%3E50x50%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" data-holder-rendered="true" style="width: 50px; height: 50px;">
<div class="media-body">
<strong class="notification-title"><a href="#">Nikola Tesla</a> resolved <a href="#">T-14 - Awesome stuff</a></strong>
<p class="notification-desc">Resolution: Fixed, Work log: 4h</p>
<div class="notification-meta">
<small class="timestamp">27. 10. 2015, 08:00</small>
</div>
</div>
</div>
</li>
<li class="notification">
<div class="media">
<img data-src="holder.js/50x50?bg=cccccc" class="mr-2 img-circle" alt="50x50" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2250%22%20height%3D%2250%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2050%2050%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_163b3713d4d%20text%20%7B%20fill%3A%23919191%3Bfont-weight%3Abold%3Bfont-family%3AArial%2C%20Helvetica%2C%20Open%20Sans%2C%20sans-serif%2C%20monospace%3Bfont-size%3A10pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_163b3713d4d%22%3E%3Crect%20width%3D%2250%22%20height%3D%2250%22%20fill%3D%22%23cccccc%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%226.4765625%22%20y%3D%2229.55625%22%3E50x50%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" data-holder-rendered="true" style="width: 50px; height: 50px;">
<div class="media-body">
<strong class="notification-title"><a href="#">James Bond</a> resolved <a href="#">B-007 - Desolve Spectre organization</a></strong>
<div class="notification-meta">
<small class="timestamp">1. 9. 2015, 08:00</small>
</div>
</div>
</div>
</li>
</ul>
</div>
</li><!-- /dropdown -->
<li class="nav-item"><a class="nav-link" href="#">Dashboard</a></li>
<li class="nav-item"><a class="nav-link" href="#">Projects</a></li>
<li class="nav-item"><a class="nav-link" href="#">People</a></li>
</ul>
</div>
</nav>
See the result in JSFiddle:
Theaboveresultisnotbeatingwiththefollowingimage:
Any solution?