html - Bootstrap Navbar not showing an un-ordered list -
i making navbar using bootstrap 3 , when put in ul tag , add list item doesn't show up. have tried wrapping in div class of container doesn't work.
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>bootstrap course</title> <link rel="stylesheet" href="styles.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mtjoasx8j1au+a5wdvnpi2lkffwweaa8hdddjzlplegxhjvme1fgjwpgmkzs7" crossorigin="anonymous"> </head> <body> <div class="navbar navbar-default navbar-fixed-top"> <div class="container"> <a class="navbar-brand" href="#"><img src="logo.png"></a> <div class="nav-collapse collapse navbar-responsive-collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">home</a></li> </ul> </div> </div> </div> <div class="row"> </div> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384- 0msbjdehialfmubbqp6a4qrprq5ovfw37prr3j5elqxss1yvqotnepnhvp9aj7xs" crossorigin="anonymous"></script> <script src="scripts.js"></script> </body> </html>
please use navbar
code listed in bootstrap documentation.
you need replace class="nav-collapse collapse navbar-responsive-collapse">
class="collapse navbar-collapse"
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <div class="navbar navbar-default navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <a class="navbar-brand" href="#"> <img src="logo.png"> </a> </div> <div class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">home</a> </li> </ul> </div> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <script src="scripts.js"></script>
Comments
Post a Comment