Articles → BOOTSTRAP → Specify The Size Of Buttons In Button Groups In Bootstrap

Specify The Size Of Buttons In Button Groups In Bootstrap






Classes





Example


<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <meta charset="utf-8" />
      <title></title>
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
   </head>
   <body>
      <div class="btn-group-lg">
         <button class="btn btn-primary">Large Button 1</button>
         <button class="btn btn-primary">Large Button 2</button>
         <button class="btn btn-primary">Large Button 3</button>
      </div>
      <br />
      <div class="btn-group-sm">
         <button class="btn btn-primary">Small Button 1</button>
         <button class="btn btn-primary">Small Button 2</button>
         <button class="btn btn-primary">Small Button 3</button>
      </div>
      <br />
      <div class="btn-group-xs">
         <button class="btn btn-primary">Extra Small Button 1</button>
         <button class="btn btn-primary">Extra Small Button 2</button>
         <button class="btn btn-primary">Extra Small Button 3</button>
      </div>
   </body>
</html>



Output


Picture showing the output of specifying the size of buttons in button groups in Bootstrap
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, September 29, 2021

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250