Having trouble with the navbar collapsing on itself? The issue seems to occur around 1280px window size, but works fine when the window is wider or narrower.
https://www.bootply.com/AcsaaqReAL
.navbar-custom {
background-color: #333333;
border-radius: 5px;
}
/* change the link color */
.navbar-custom .navbar-nav .nav-link {
color: #999999;
}
/* change the color of active or hovered links */
.navbar-custom .nav-item.active .nav-link,
.navbar-custom .nav-item:hover .nav-link {
color: #ffffff;
}
a.nav-link:hover {
color:#ffffff !important;
text-decoration:none;
}
.active{
background-color:#000000;
}
.navbar {
margin-top: 10px;
margin-bottom: 10px;
padding-top: 0;
padding-bottom: 0;
}
.nav-link {
padding-top: 15px;
padding-bottom: 15px;
border-radius: 0;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<!-- bootstrap nav -->
<nav class="navbar navbar-expand navbar-light navbar-custom">
<div class="container-fluid">
<ul class="nav navbar-nav mx-auto">
<li class="nav-item active"><a class="nav-item nav-link">Home 1</a></li>
<li class="nav-item"><a class="nav-item nav-link">Home 1</a></li>
<li class="nav-item"><a class="nav-item nav-link">Home 1</a></li>
<li class="nav-item"><a class="nav-item nav-link">Home 1</a></li>
<li class="nav-item"><a class="nav-item nav-link">Home 1</a></li>
</ul>
</div>
</nav>
<!-- /bootstrap nav -->
</div>
<div class="col-md-4"></div></div>
<div id="push"></div>