Make smaller button in bootstrap

Make smaller button in bootstrap

I use bootstrap 3 buttons and I want to modify the size to smaller, I’ve tried with the following which doesn’t work
.btn-sml {
padding: 10px 10px;
font-size: 22px;
border-radius: 8px;

There is a better way to achieve this ?


Solution 1:

Bootstrap provides four button sizes:

The classes that define the different sizes are:


The following example shows the code for different button sizes:

<!DOCTYPE html>
<html lang="en">
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="">
  <script src=""></script>
  <script src=""></script>

<div class="container">
  <h2>Button Sizes</h2>
  <button type="button" class="btn btn-primary btn-lg">Large</button>
  <button type="button" class="btn btn-primary btn-md">Medium</button>    
  <button type="button" class="btn btn-primary btn-sm">Small</button>
  <button type="button" class="btn btn-primary btn-xs">XSmall</button>

Solution 2:

Bootstrap 4 doesn’t support xs, here we can use only class “btn-sm” for small icon.

<a class="btn btn-info btn-sm"href="#"><i class="fa fa-edit fa-fw"></i></a>


Related:  font-awesome not working bundleconfig in MVC5