![]() |
VOOZH | about |
A navigation bar is used in every website to make it more user-friendly so that the navigation through the website becomes easy and the user can directly search for the topic of their interest.
Navbar Placement is used to set the position of the navbar. We can use position utilities for the placement of the Navbar like fixed-top, fixed-bottom or sticky-top, etc.
Navbar Placement used Classes:
Syntax:
<nav class="navbar fixed-*"> <div> <a class="navbar-brand" href="#"> ... </a> ... </div> </nav>
Note: We can substitute this * with top or bottom as per requirement
Example 1: In this example, we will learn about Navbar placement at a fixed-top and place the navbar at the top.
Output:
Example 2: In this example, we will learn about Navbar placement at the fixed-bottom and place navbar at the bottom.
Output:
References: https://getbootstrap.com/docs/5.0/components/navbar/#placement