I'm facing a challenge in adding separators within a navigation bar between the navigation items. I am unsure how to evenly space out the padding on these separators next to each navigation item.
https://i.sstatic.net/vjYti.png
Another issue I encountered is that the separators are also displaying in the toggle navigation bar when it collapses. I have attempted to remove them without success.
https://i.sstatic.net/XZhxX.png
If anyone has a more effective method for creating separators, I would greatly appreciate the help.
Below is the code snippet:
.navbar-nav > li > a::after {
content: "|";
padding: 0 5px
}
<div class="collapse navbar-collapse" id="navbarResponsive">
<!--
1) collapse - class dedicate to a given alement
2) navbar-collapse: show elements to bootstrap which belong to navbar, then use function - collapse
-->
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#">About Us</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="#">Pricing</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="#">Services</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="#">Registration</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="#">Tips</a>
</li>
</ul>
</div>