1.

 Pills with Dropdowns in Bootstrap

Answer»

Pills based navigation can be created in Bootstrap. With that, we can also FORM Pills with Dropdowns.

Create Pills with:

<UL class="nav nav-pills">

Use the class .nav-stacked to create Pills with Dropdowns:

<ul class="nav nav-pills nav-stacked">

Let us now see how we can create Pills with Dropdowns:

<!DOCTYPE html> <html lang="en"> <head>   <title>Bootstrap Pills with Dropdowns</title>   <meta charset="utf-8">   <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.3.1/jquery.min.js"></script>   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <BODY> <div class="container">   <h3>Pills with Dropdown</h3>   <ul class="nav nav-pills nav-stacked">     <li class="ACTIVE"><a href="#">Home</a></li>     <li><a href="#">AboutUs</a></li>     <li><a href="#">Company</a></li>     <li><a href="#">Services</a></li>     <li class="dropdown">       <a class="dropdown-toggle" data-toggle="dropdown" href="#">Products        <span class="caret"></span>       </a>       <ul class="dropdown-menu">       <li><a href="#">Product1</a></li>       <li><a href="#">PRODUCT2</a></li>       <li><a href="#">Product3</a></li>       <li><a href="#">Product4</a></li>       <li><a href="#">Product5</a></li>     </ul>   </li>     <li><a href="#">Contact</a></li>   </ul> </div> </body> </html>

The following is an example:



Discussion

No Comment Found