1.

 Make a set of buttons appear vertically stacked rather than horizontally in Bootstrap

Answer»

The .btn-group-vertical class is used in Bootstrap to form a set of BUTTONS appear vertically stacked. This is a class for Button Groups.

The following is an example:

<!DOCTYPE html> <html lang="en"> <head>   <title>Bootstrap Button Groups</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">   <h2>Teams (Vertical Button Group)</h2>   <p>The following is the INFORMATION about the teams:</p>   <div class="btn-group-vertical">     <button type="button" class="btn btn-primary">Real Madrid</button>     <button type="button" class="btn btn-primary">CSKA Moscow</button>     <button type="button" class="btn btn-primary">Manchester United</button>     <button type="button" class="btn btn-primary">Barcelona</button>   </div>   <h2>Teams (Horizontal Button Group)</h2>   <p>The following is the information about the teams:</p>   <div class="btn-group">     <button type="button" class="btn btn-primary">Real Madrid</button>     <button type="button" class="btn btn-primary">CSKA Moscow</button>     <button type="button" class="btn btn-primary">Manchester United</button>     <button type="button" class="btn btn-primary">Barcelona</button>   </div> </div> </body> </html>

Here is the output that displays a group of buttons vertically stacked:



Discussion

No Comment Found