Bootstrap Tabs and Pills

Bootstrap Menus

Bootstrap menu is used to create different types of menu. It can created horizontal with its .list-inlineclass.
<div class="container">    
  <h3>Example of Bootstrap Menu</h3>    
  <ul class="list-inline">    
    <li><a href="#">Home</a></li>    
    <li><a href="#">About</a></li>    
    <li><a href="#">Contact</a></li>    
    <li><a href="#">services</a></li>    
  </ul>    
</div>
Try Now

Bootstrap Tabs

Bootstrap tabl is look like is menu but there is some difference. We can create a basic navigation tag with <ul class="nav nav-tabs">. You can mark the current page with <li class="active">. Let us see an example of Bootstrap Tabs:
<div class="container">  
  <h3>Example of  Tabs</h3>  
  <ul class="nav nav-tabs">  
    <li class="active"><a href="#">Home</a></li>  
    <li><a href="#">Service</a></li>  
    <li><a href="#">About</a></li>  
    <li><a href="#">Contact</a></li>  
  </ul>  
</div>
Try Now

Bootstrap Tabs with Dropdown Menu

We can create tabs with the dropdown menu. Let us see an example of Bootstrap Tabs with Dropdown Menu:
<div class="container">  
  <h3>Example of  Tabs</h3>  
  <ul class="nav nav-tabs">  
    <li class="active"><a href="#">Home</a></li>  
    <li class="dropdown">  
    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Tutorial  
    <span class="caret"></span></a>  
    <ul class="dropdown-menu">  
      <li><a href="#">HTML</a></li>  
      <li><a href="#">Bootstrap</a></li>  
    </ul>  
  </li>  
    <li><a href="#">Service</a></li>  
    <li><a href="#">About</a></li>  
    <li><a href="#">Contact</a></li>  
  </ul>  
</div>
Try Now

Bootstrap Pills

We can create pills with the help of <ul class="nav nav-pills">. By default it is supported horizontal. Let us see an example of Bootstrap Pills:
<div class="container">  
  <h3>Example of  Pills</h3>  
  <ul class="nav nav-pills">  
    <li class="active"><a href="#">Home</a></li>  
    <li><a href="#">Service</a></li>  
    <li><a href="#">About</a></li>  
    <li><a href="#">Contact</a></li>  
  </ul>  
</div>
Try Now

Bootstrap Vertical Pills

We can create vertical pill by using .nav-stacked class.
<div class="container">  
  <h3>Example of Vertical Pills</h3>  
<ul class="nav nav-pills nav-stacked">  
    <li class="active"><a href="#">Home</a></li>  
    <li class="dropdown">  
    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Tutorial  
    <span class="caret"></span></a>  
    <ul class="dropdown-menu">  
      <li><a href="#">HTML</a></li>  
      <li><a href="#">Bootstrap</a></li>  
    </ul>  
  </li>  
    <li><a href="#">Service</a></li>  
    <li><a href="#">About</a></li>  
    <li><a href="#">Contact</a></li>  
  </ul>  
</div>
Try Now

Note : We can create center/justify Tabs and pills by using .nav-justified class.

Bootstrap Dynamic Pills

Bootstrap Dynamic Pills is same as dynamic toggleable tabs but there is some difference that can be understand by its example. Example
<div class="container">  
  <h2>Example of Dynamic Pills</h2>  
  <ul class="nav nav-pills">  
    <li class="active"><a data-toggle="pill" href="#home">Home</a></li>  
    <li><a data-toggle="pill" href="#menu1">Service</a></li>  
    <li><a data-toggle="pill" href="#menu2">About</a></li>  
    <li><a data-toggle="pill" href="#menu3">Contact</a></li>  
  </ul>    
  <div class="tab-content">  
    <div id="home" class="tab-pane fade in active">  
      <h3>HOME</h3>  
     <p>Welcome to <strong>Home Page</strong>. Today we are learning Bootstrap Tutorial.</p>  
    </div>  
    <div id="menu1" class="tab-pane fade">  
      <h3>Services</h3>  
      <p>Welcome to our<strong> Service Page</strong>. We provides a lots of services.</p>  
    </div>  
    <div id="menu2" class="tab-pane fade">  
      <h3>About</h3>  
     <p>Welcome to<strong> About Page.</strong> We provides a lots of services.</p>  
    </div>  
    <div id="menu3" class="tab-pane fade">  
      <h3>Contact</h3>  
      <p>You can <strong> Contact us.</strong></p>  
    </div>  
  </div>  
</div>
Try Now

Related Topics

Bootstrap 4 Grid Classes

Bootstrap 4 Grid Classes Extra-small Grid – In the extra-small grid system class, when you create the grid (columns), the columns will not be stacked on top of each other on...

8 minutes read.

Bootstrap 4 Inputs

Bootstrap Inputs Bootstrap Form Inputs – Several pre-defined input types are available in HTML and Bootstrap. These input types help in styling the forms. When an input type is specified in the form, it means...

10 minutes read.

Bootstrap Wells

In Bootstrap, well are used to add a rounded border around an element. It is default some padding and gray background color. It is like a container that displays the content....

1 minute read.

Bootstrap 4 Grid System

Bootstrap 4 Grid Systems Bootstrap offers a responsive and mobile-first grid system with the help of which we can divide the screen of the web browser into 12 horizontal parts. It has predefined classes...

4 minutes read.

Bootstrap 4 Filters

 Bootstrap 4 Filters Bootstrap 4 provides a filter component that is used to search an element from a list, table, etc. Bootstrap does not contain any component or utility that helps...

5 minutes read.

Bootstrap 4 Grid System

Bootstrap 4 Grid System The bootstrap 4 grid system is used to create a responsive website layout. The bootstrap 4 offers a mobile-first flexbox grid system that allows you to divide...

4 minutes read.

Bootstrap 4 Progress Bar

Bootstrap Progress Bar Bootstrap 4 offers progress bars that are used to represent the progress of tasks such as downloading a file, software installation, etc. on the computer. It represents the percentage of the...

9 minutes read.

Bootstrap Panels

A bootstrap panel is used to create bordered box with some padding around its content. It is created with the .panels classes, and .panel-body classes. There are following classes of the panel: Panel header Panel...

4 minutes read.

Bootstrap Tables

We can create different types of responsive and awesome bootstrap table like: striped , border etc. Bootstrap Basic Table We can create a basic bootstrap table by using its class .table. It has...

3 minutes read.

Bootstrap 4 Pagination

Bootstrap 4 Pagination Bootstrap pagination is used to show the existence of a series of web pages of the website. It allows navigation on multiple pages of a website. In pagination, there is a block...

9 minutes read.

Bootstrap First Example

1) Add HTML5 doctype Before starting the example of Bootstrap, we should know about the some basic rules of Bootstrap. We have to add HTML5 doctype with lang element and CSS properties. <!DOCTYPE html>   <html lang="en">     <head>       <meta charset="utf-8">      </head>   </html> 2) Bootstrap...

2 minutes read.

Bootstrap 4 Flex

Bootstrap 4 Flex Flex is a Bootstrap 4 component used to manage the layout, navigation bar, grid columns, sizing, alignment, and other components. The flexbox or flex utility is the replacement...

26 minutes read.

Bootstrap 4 Colors

Bootstrap 4 Colors Bootstrap 4 consists of classes that are used to set colors according to the context of the element, and with the help of these classes, we can read...

2 minutes read.

Bootstrap 4 Content

Typography Typography is used for styling and formatting the content. It also helps in creating customized headings, sub-headings, lists, paragraphs, etc. Headings Bootstrap 4 offers HTML heading <h1> to <h6> that has bolder...

8 minutes read.

Bootstrap 4 Media Objects

Bootstrap 4 Media Objects Bootstrap 4 offers a media object component that aligns the media objects and the content. The media object is used to create a repetitive and complex component...

7 minutes read.

Bootstrap 4 Card

In Bootstrap 4, a card is a bordered box with padding around its content. It has options for headers, footers, colors, content, etc. The card provides the link, title, image,...

8 minutes read.

Bootstrap Notification Bubble

What is a notification bubble? Bubbles are built into the Notification system. They float on top of the website or the button to indicate pending notifications. Bubbles can be expanded to reveal...

5 minutes read.

Bootstrap 4 Buttons

Bootstrap Buttons Bootstrap provides many custom button styles. These buttons are used in forms and dialog boxes for actions. Bootstrap offers various predefined classes for providing styles to buttons. There are many classes that are used...

7 minutes read.

Bootstrap 4 Spinners

Bootstrap 4 offers spinner is a loading indicator that is used to display the loading state of any component or web page. The spinner is also known as a loader...

7 minutes read.

CakePHP Layouts & Elements

A layout includes a presentation code that can be wrapped out in your view. It means that what you want to see in your view should be well-positioned in layout. When you create...

9 minutes read.