Bootstrap Tutorial - Customize navbar








The following code shows how to customize navbar.

Example

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
<style type='text/css'>
.navbar {<!-- w w w  . ja  v  a  2 s  .  c om-->
  width: 600px;
  margin: 0 auto;
  display: block;
  background-color: black;
}
.nav {
  text-align: center;
}
</style>
</head>
<body style='margin:30px'>
  <div class="container">
    <div class="navbar">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#">Home</a></li>
        <li><a href="#">Home</a></li>
        <li><a href="#">Home</a></li>
        <li><a href="#">Home</a></li>
      </ul>
    </div>
  </div>
</body>
</html>

Click to view the demo