A navigation header that appears at the top of the page is called a navigation bar:
==== Navigation Bars MUKAVU ====
Basic Navbar
A navigation bar made with Bootstrap can expand or contract based on the size of the screen.
The .navbar class creates a conventional navigation bar, while the .navbar-expand-xl|lg|md|sm responsive collapsing class stacks the navbar vertically on extremely large, large, medium, and small displays.
Use a <ul>element with class=”navbar-nav” to put links within the navbar. Next, include <a> elements with a .nav-link class after <li> elements with a.nav-item class:
In order to make a navigation bar that is always vertical, remove the .navbar-expand-* class:
Link 1Â Â
Link 2Â Â
Link 3
Example
...
Centered Navbar
To make the navigation bar center, add the .justify-content-center class:
Link 1Â Â Link 2Â Â Link 3
Example
...
Colored Navbar
To alter the navbar’s background color, use any of the .bg-color classes (.bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger, .bg-secondary, .bg-dark and .bg-light).
Tip: Use the .navbar-dark class to add a white text color to all of the links in the navbar, or the .navbar-light class to add a black text color.
Bootstrap 5 will automatically style pictures with the .navbar-brand class to fit the navbar vertically.
Example
Navbar Text
To maintain proper padding and text color, vertically align any non-linking components inside the navbar by using the .navbar-text class.
Example
Navbar text
Tip: To always show the toggler button and conceal navbar links, you can also remove the .navbar-expand-md class.
==== Navigation Bar MUKAVU ====
You typically wish to hide the navigation links and replace them with a button that, when pressed, should display them, especially on small screens.
Use a button with the properties class=”navbar-toggler”, data-bs-toggle=”collapse”, and data-bs-target=”#thetarget” to create a collapsible navigation bar. After that, enclose the navbar’s content (links, etc.) in a <div> element with class=”collapse navbar-collapse” and an id that corresponds to the button’s data-bs-target (“thetarget”).