Bootstrap navbar
The first thing we will create is the Bootstrap navbar
. Thenavbar
within Bootstrap is one of the most recognizable features within the Bootstrap framework due to the nature of how it works. So, to provide an example of how it works, if we navigate to the Bootstrap website and then to the Documentation
tab, we have all the navigation elements across the top of the screen:
The Bootstrap navigation
If we shrink the browser, we can see how the navigation shrinks as well. Then, when it hits the smaller screen, we get this hamburger menu, which, if we click on it, displays the navigation elements within it:
The Bootstrap mobile navigation
Coding the Bootstrap navigation
Now let's head to the navbar
section of Components
in our Bootstrap website. Here, you can find all the necessary documentation to build your navigation with Bootstrap.
Now let's head back to our HTML file and write the following code:
<nav class="navbar navbar-expand-lg fixed-top "> </nav>
The details...