From the course: Bootstrap 4 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create a navbar

Create a navbar - Bootstrap Tutorial

From the course: Bootstrap 4 Essential Training

Start my 1-month free trial

Create a navbar

- [Narrator] The navbar component is related to the nav component, so if you're familiar with navs, then creating navbars will be simple. Now, it is completely redesigned from Bootstrap 3, and essentially it's simpler to use and customize, but it does have a lot more classes than before. So, let's take a look at how it works. So, the navbar class is the class that goes on the main container, and it can have a number of other elements inside it. Now, by default, navbar components will stack, so we need to add a navbar-expand, with optional breakpoints to control when the navbar is going to expand. So, by default, all the navigation elements will be right on top of one another, and we have to specify when you want them to go horizontal. That's what this class is for. Now, in addition to navbar and navbar-expand, we also need to specify a color for the navbar itself, and to do that we use just the basic bg-COLOR classes. So, we've talked about these before, and they are all over the…

Contents