Skip to content Skip to sidebar Skip to footer

Why Twitter Bootstrap 2 Btn-group Doesn't Work?

Is there any possibility to make it work? Here's my code (I'm using it in a table):
$player->name') }}">View</a> {{ Form::open(array('class' => 'btn-group', 'method' => 'DELETE', 'route' => array('players.destroy', $player->id))) }} {{ Form::submit('Delete', array('class' => 'btn btn-mini btn-danger')) }} {{ Form::close() }} </div> </td>

your HTML at the end should look something like this: http://jsfiddle.net/hyWnt/1/


Updated jsfiddle for Bootstrap 2.3.2 : http://jsfiddle.net/msturdy/HyfKZ/4/

the changes are:

New CSS:

div.btn-group + form.btn-group {
    margin-left: -5px;
    display:inline;
}

And the code should then be:

<td>
    <div class="btn-group">
        <div class="btn-group">
            <a href="{{ URL::to('characters/'. $player->name) }}" class="btn btn-mini btn-info">View</a>
            <span class="btn" style="display:none"></span>
        </div>
        <form method="POST" action="http://localhost:8000/account/management/characters/delete/23" accept-charset="UTF-8" class="btn-group">
            <input name="_token" type="hidden" value="7GKfarNh81RKu1Y5Dts8bYeFjOG7i8bLdD0CdNLa">        
            <input name="_method" type="hidden" value="DELETE">
            <input class="btn btn-mini btn-danger" type="submit" value="Delete">            
        </form>    
    </div>
</td>

Post a Comment for "Why Twitter Bootstrap 2 Btn-group Doesn't Work?"