.nav-justified - Centers tabs/pills. - HTML CSS Bootstrap Class List

HTML CSS examples for Bootstrap Class List:nav-justified

Description

.nav-justified - Centers tabs/pills.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
  <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.2.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head><!--from w  w w  .java2  s .  com-->
<body>

<div class="container">
  <h2>Justified Tabs/Pills</h2>
  <p>This is a test. This is a test. This is a test.This is a test. This is a test. This is a test.</p>

  <h3>Tabs:</h3>
  <ul class="nav nav-tabs nav-justified" role="tablist">
    <li class="active"><a href="#">Home</a></li>
    <li><a href="#">HTML</a></li>
    <li><a href="#">CSS</a></li>
    <li><a href="#">About</a></li>
  </ul>

  <h3>Pills:</h3>
  <ul class="nav nav-pills nav-justified" role="tablist">
    <li class="active"><a href="#">Home</a></li>
    <li><a href="#">HTML</a></li>
    <li><a href="#">CSS</a></li>
    <li><a href="#">About</a></li>
  </ul>
</div>

</body>
</html>

Related Tutorials