Bootstrap Tutorial - Create navbar text pull right








The following code shows how to create navbar text pull right.

Example

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-git2.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
</head><!--  w ww. ja  v  a  2 s.  co  m-->
<body>
  <div class="navbar navbar-fixed-top navbar-inverse">
    <div class="navbar-inner">
      <div class="container-fluid">
        <div class="nav-collapse">
          <ul class="nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#about">About</a></li>
            <li><a href="#contact">Contact</a></li>
          </ul>
          <p class="navbar-text pull-right">
            Logged in as <a href="#">username</a>
          </p>
        </div>
      </div>
    </div>
  </div>
  <div class="container-fliud">
    <div class="row-fluid">
      <div class="span4"></div>
      <div class="span4">Span 4</div>
      <div class="span4">Span 4</div>
    </div>
  </div>
</body>
</html>

Click to view the demo