18

If I want to minimize icon size, how can I make icon small when using bootstrap?

This is demo http://jsfiddle.net/AqUBu/

I'd like to minimize the size of this human icon.

enter image description here

<span class='badge badge-success'><i class='icon-user icon-white'></i><i class='icon-user icon-white'></i><i class='icon-user icon-white'></i></span>
MKK
  • 2,713
  • 5
  • 31
  • 51

5 Answers5

36

If you are using Bootstrap 3, you can use the <small> tag, like this: <small><span class="glyphicon glyphicon-send"></span></small> It works perfectly with Bootstrap 3.

Danny Mahoney
  • 1,255
  • 2
  • 13
  • 24
Mrinal
  • 464
  • 5
  • 3
24

Glyphicons and other icons can be re-sized precisely with the CSS property font-size:

You know... being glyphs and all.

Danny Mahoney
  • 1,255
  • 2
  • 13
  • 24
8

You can use class="btn btn-xs"

Reference: https://getbootstrap.com/components/

Jiri Tousek
  • 12,211
  • 5
  • 29
  • 43
sssimon
  • 103
  • 1
  • 7
3

From http://getbootstrap.com/css/#small-text

Small text

For de-emphasizing inline or blocks of text, use the <small> tag to set text at 85% the size of the parent. Heading elements receive their own font-size for nested <small> elements.

You may alternatively use an inline element with .small in place of any <small>.

Try:

<span class='badge badge-success small'>
  <i class='icon-user icon-white'></i>
  <i class='icon-user icon-white'></i>
  <i class='icon-user icon-white'></i>
</span>
Simon
  • 5,158
  • 8
  • 43
  • 65
1

None of the above worked for me, I am using a combination of Bootstrap 4 and FontAwesome icons. I discovered Bootstrap 4 has it's own class to make smaller buttons:

<button class="btn btn-sm btn-secondary ">
    <i class="fa fa-pencil"></i>
</button>

Bootstrap 4 button documentation (#Sizes)

If you want to make a button any smaller than this you will probably have to make some custom css, as simply changing the icon's size will no longer modify the size of the wrapping button.

Rohan
  • 456
  • 3
  • 16