Twitter bootstrap, button on panel title

1

I'm trying to put a button inside the title of a panel of twitter bootstrap 3, however this button is not aligned centrally vertical panel .

Code:

<divclass="panel panel-default">
    <div class="panel-heading"> 
        Fórum
        <div class="pull-right"><button class="btn">Criar tópico</button>       </div>
        </div>
        <div class="panel-body">

        </div>


</div>
    
asked by anonymous 25.07.2014 / 20:32

2 answers

4

Try to use a smaller button, which happens, is that the button margins are bursting with div of header of panel .

<button class="btn btn-xs">Criar tópico</button>

It happens that the normal button is the same size as the header of a panel, but using an extra-small type button is perfect in this situation.

It would be strange even as%% of it is greatly enlarged by the margins.

JSFiddle: link

    
25.07.2014 / 20:37
0

I did so and it worked:

<div class="panel-heading">
                      <div class="row"> <h3 class="col-xs-11 panel-title">Fórum</h3>
                            <div class="pull-right col-xs-1"><a href="#" class="btn btn-info btn-xs" style="border:0">Criar Tópico</a></div>
                      </div>
                  </div>
    
14.10.2014 / 16:43