1<nav class="navbar navbar-expand-lg navbar-light bg-light">
2 <a class="navbar-brand" href="#">Navbar</a>
3 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
4 <span class="navbar-toggler-icon"></span>
5 </button>
6 <div class="collapse navbar-collapse" id="navbarNav">
7 <ul class="nav navbar-nav ml-auto">
8 <li class="nav-item active">
9 <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
10 </li>
11 <li class="nav-item">
12 <a class="nav-link" href="#">Features</a>
13 </li>
14 <li class="nav-item">
15 <a class="nav-link" href="#">Pricing</a>
16 </li>
17 <li class="nav-item">
18 <a class="nav-link disabled" href="#">Disabled</a>
19 </li>
20 </ul>
1<nav class="navbar navbar-expand-lg navbar-light bg-light">
2 <a class="navbar-brand" href="#">Navbar</a>
3 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
4 <span class="navbar-toggler-icon"></span>
5 </button>
6
7 <div class="collapse navbar-collapse" id="navbarSupportedContent">
8 <ul class="navbar-nav mr-auto">
9 <li class="nav-item active">
10 <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
11 </li>
12 <li class="nav-item">
13 <a class="nav-link" href="#">Link</a>
14 </li>
15 <li class="nav-item dropdown">
16 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
17 Dropdown
18 </a>
19 <div class="dropdown-menu" aria-labelledby="navbarDropdown">
20 <a class="dropdown-item" href="#">Action</a>
21 <a class="dropdown-item" href="#">Another action</a>
22 <div class="dropdown-divider"></div>
23 <a class="dropdown-item" href="#">Something else here</a>
24 </div>
25 </li>
26 <li class="nav-item">
27 <a class="nav-link disabled" href="#">Disabled</a>
28 </li>
29 </ul>
30 <form class="form-inline my-2 my-lg-0">
31 <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
32 <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
33 </form>
34 </div>
35</nav>
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <title>Bootstrap Example</title>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
8 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
9 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
10</head>
11<body>
12
13<nav class="navbar navbar-inverse">
14 <div class="container-fluid">
15 <div class="navbar-header">
16 <a class="navbar-brand" href="#">WebSiteName</a>
17 </div>
18 <ul class="nav navbar-nav">
19 <li class="active"><a href="#">Home</a></li>
20 <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Page 1 <span class="caret"></span></a>
21 <ul class="dropdown-menu">
22 <li><a href="#">Page 1-1</a></li>
23 <li><a href="#">Page 1-2</a></li>
24 <li><a href="#">Page 1-3</a></li>
25 </ul>
26 </li>
27 <li><a href="#">Page 2</a></li>
28 </ul>
29 <ul class="nav navbar-nav navbar-right">
30 <li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
31 <li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
32 </ul>
33 </div>
34</nav>
35
36<div class="container">
37 <h3>Right Aligned Navbar</h3>
38 <p>The .navbar-right class is used to right-align navigation bar buttons.</p>
39</div>
40
41</body>
42</html>
43
1<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
2 <div class="navbar-collapse collapse w-100 dual-collapse2 order-1 order-md-0">
3 <ul class="navbar-nav ml-auto text-center">
4 <li class="nav-item active">
5 <a class="nav-link" href="#">Link</a>
6 </li>
7 </ul>
8 </div>
9 <div class="mx-auto my-2 order-0 order-md-1 position-relative">
10 <a class="mx-auto" href="#">
11 <img src="//placehold.it/120/ccff00" class="rounded-circle">
12 </a>
13 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".dual-collapse2">
14 <span class="navbar-toggler-icon"></span>
15 </button>
16 </div>
17 <div class="navbar-collapse collapse w-100 dual-collapse2 order-2 order-md-2">
18 <ul class="navbar-nav mr-auto text-center">
19 <li class="nav-item">
20 <a class="nav-link" href="#">Link</a>
21 </li>
22 </ul>
23 </div>
24</nav>
25
1//an example of a bootstrap nav bar which you can use as a boilerplate code
2<nav class="navbar navbar-expand-lg navbar-light bg-light">
3 <a class="navbar-brand" href="#">Navbar</a>
4 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
5 <span class="navbar-toggler-icon"></span>
6 </button>
7
8 <div class="collapse navbar-collapse" id="navbarSupportedContent">
9 <ul class="navbar-nav mr-auto">
10 <li class="nav-item active">
11 <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
12 </li>
13 <li class="nav-item">
14 <a class="nav-link" href="#">Link</a>
15 </li>
16 <li class="nav-item dropdown">
17 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
18 Dropdown
19 </a>
20 <div class="dropdown-menu" aria-labelledby="navbarDropdown">
21 <a class="dropdown-item" href="#">Action</a>
22 <a class="dropdown-item" href="#">Another action</a>
23 <div class="dropdown-divider"></div>
24 <a class="dropdown-item" href="#">Something else here</a>
25 </div>
26 </li>
27 <li class="nav-item">
28 <a class="nav-link disabled" href="#">Disabled</a>
29 </li>
30 </ul>
31 <form class="form-inline my-2 my-lg-0">
32 <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
33 <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
34 </form>
35 </div>
36</nav>