Mr.Joe
Mr.Joe

Reputation: 93

How to change navbar border color in Bootstrap 4

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.

Upvotes: 8

Views: 24544

Answers (4)

Jayakumar Bellie
Jayakumar Bellie

Reputation: 9538

<nav class="navbar border border-dark">
   ...
</nav>

https://getbootstrap.com/docs/4.0/utilities/borders/#border-color

Upvotes: 0

domshyra
domshyra

Reputation: 952

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.

Upvotes: 8

ALOMGIR HOSSEN
ALOMGIR HOSSEN

Reputation: 69

 <style>
        .navbar
        {
            border:5px solid #000;
        }
      </style>

try it

Thanks

Upvotes: 6

Klooven
Klooven

Reputation: 3926

You can use the border classes in Bootstrap.

Check this page for the classes.

Eg. class border-primary.

Upvotes: 0

Related Questions