Exercise:
Make the navigation bar stay at the bottom of the page.
Hint
Hint: Use the .navbar-fixed-bottom class.
Edit This Code:
See Result »
<!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Case</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <nav class="navbar navbar-inverse"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="exercise.asp-filename=exercise_navbars3.html#">WebSiteName</a> </div> <div> <ul class="nav navbar-nav"> <li class="active"><a href="exercise.asp-filename=exercise_navbars3.html#">Home</a></li> <li><a href="exercise.asp-filename=exercise_navbars3.html#">Page 1</a></li> <li><a href="exercise.asp-filename=exercise_navbars3.html#">Page 2</a></li> <li><a href="exercise.asp-filename=exercise_navbars3.html#">Page 3</a></li> </ul> </div> </div> </nav> <div class="container"> <h1>Hello World!</h1> </div> </body> </html>
Result:
Show Answer
Correct Code:
<!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Case</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <nav class="navbar navbar-inverse navbar-fixed-bottom"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="exercise.asp-filename=exercise_navbars3.html#">WebSiteName</a> </div> <div> <ul class="nav navbar-nav"> <li class="active"><a href="exercise.asp-filename=exercise_navbars3.html#">Home</a></li> <li><a href="exercise.asp-filename=exercise_navbars3.html#">Page 1</a></li> <li><a href="exercise.asp-filename=exercise_navbars3.html#">Page 2</a></li> <li><a href="exercise.asp-filename=exercise_navbars3.html#">Page 3</a></li> </ul> </div> </div> </nav> <div class="container"> <h1>Hello World!</h1> </div> </body> </html>
Correct Result:
Hide Answer
Privacy Policy