19

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>
4
  • post your related CSS here. Commented Jan 23, 2013 at 4:58
  • @Pawan Thanks I use bootstrap. it's way too long so that I had to use JSFiddle to put them all. Please check my demo Commented Jan 23, 2013 at 5:00
  • consider awe's answer stackoverflow.com/a/1341462/1135581 Commented Jan 23, 2013 at 5:02
  • I tried them to wrap with background-size: 50% 50%; but it didn't work:( Commented Jan 23, 2013 at 5:11

5 Answers 5

37

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.

Sign up to request clarification or add additional context in comments.

Comments

24

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

You know... being glyphs and all.

Comments

8

You can use class="btn btn-xs"

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

1 Comment

these are no btn-xs styles in bootstrap doc, as well as class="btn btn-xs" doesn't work
4

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>

Comments

2

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.