In Bootstrap 3 we can change navbar color by setting .navbar-light
border-color. However, it doesn't working by setting .navbar-light
border-color in Bootstrap 4.
The Navbar is transparent by default. If you only want to change the background color, it can be done simply by applying the color to the <navbar class="bg-custom"> , but remember that won't change the other colors such as the links, hover and dropdown menu colors.
bg-color classes to add a background color to the navbar. Tip: Add a white text color to all links in the navbar with the . navbar-dark class, or use the . navbar-light class to add a black text color.
Add text-align:center to <li> or <a> to center the links. Add the border property to <ul> add a border around the navbar. If you also want borders inside the navbar, add a border-bottom to all <li> elements, except for the last one: Home.
Since the OP wanted just the border on the bottom.
<nav class="navbar border-bottom border-dark">
...
</nav>
if you'd like to change the colors or anything else with the borders refer to @klooven's answer.
Here is the link too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With