nav bar not displays in bootstrap

Posted by Klbaiju under Bootstrap on 11/8/2018 | Points: 10 | Views : 189 | Status : [Member] | Replies : 1
Hi,

I want to display a navigation bar following is my code

<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a href="#" class="navbar-brand">Recipe Book</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="#">Shopping List</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown"></li>
<a href="#" class="dropdown-toggle" role="button">Manage<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Save Data</a></li>
<li><a href="#">Fetch Data</a></li>
</ul>
</ul>
</div>
</div>
</nav>

the above displays only Recipe Book.

and shopping List and dropdown is not displaying

I have tried in online editor also

How to solve this

Regards

Baiju




Responses

Posted by: Manideepgoud on: 11/22/2018 [Member] Starter | Points: 25

Up
0
Down
Hi KLBaiju,

I think this code might help you.

<!DOCTYPE html>

<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Recipe book</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Shopping List</a></li>
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Manage<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#"></a></li>
<li><a href="#">Save Data</a></li>
<li><a href="#">Fetch Data</a></li>
</ul>
</li>
</ul>
</div>
</nav>


</body>
</html>


Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response