Place a .btn-group within another .btn-group when you want dropdown menus mixed with a series of buttons.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tutor Joes</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> <!--<link rel="stylesheet" href="css/bootstrap.min.css">--> <style> hr { margin-top: 15px; margin-bottom: 15px; display: block; } </style> </head> <body> <div class="container"> <h3>Bootstrap Button Group With Dropdown</h3> <div class="row"> <div class="col-md-6"> <div class="btn-group"> <button class="btn btn-primary">Courses</button> <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="#">C</a></li> <li><a href="#">C++</a></li> <li><a href="#">Java</a></li> <li><a href="#">C#.Net</a></li> </ul> </div> <hr> <div class="btn-group"> <button class="btn btn-primary">Home</button> <button class="btn btn-primary">Downloads</button> <div class="btn-group"> <button class="btn btn-primary">Courses</button> <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="#">C</a></li> <li><a href="#">C++</a></li> <li><a href="#">Java</a></li> <li><a href="#">C#.Net</a></li> </ul> </div> </div> </div> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> <!--<script src="js/jquery.min.js"></script>--> <!--<script src="js/bootstrap.min.js"></script>--> </body> </html>
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions