Search code examples
htmltwitter-bootstrapbuttongroup

Buttons not joining in Bootstrap Button Groups


enter image description here This is very bizarre and must be something silly. This works fine...

<div class="btn-group" role="group" id="lead_buttons">
                  <a type="button" class="btn btn-default lead" id="lead_0">All</a>
                  <a type="button" class="btn btn-default lead" id="lead_1">Lead</a>
                </div> 

... but when I change class="btn-group" to class="btn-group-sm" the buttons aren't joined anymore. They are separate.


Solution

  • This is how it should work.

    <div class="btn-group btn-group-sm" role="group" id="lead_buttons">
      <a type="button" class="btn btn-default lead" id="lead_0">All</a>
      <a type="button" class="btn btn-default lead" id="lead_1">Lead</a>
    </div>
    

    You need to add btn-group btn-group-sm.