pico
pico

Reputation: 247

Button group justify in Bootstrap 2.3.2

I see css class btn-group-justified in bootstrab-3. Is there any way to work btn-group-justified in bootstrap version 2.3.2? Is yes, how can i do it to work?

Upvotes: 1

Views: 1319

Answers (2)

Jorgelig
Jorgelig

Reputation: 294

It works fine for me (LESS):

.btn-group-justified{
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;

    >.btn,
    >.btn-group{
        display: table-cell;
        float: none;
        width: 1%;
    }

    >.btn-group{
        .btn{ width: 100%; }
        .dropdown-menu{ left: auto; }
    }
}

Upvotes: 0

dpkk87
dpkk87

Reputation: 71

HTML:    

        <div class="btn-group btn-justified">
            <a class="btn">Left</a>
            <a class="btn">Middle</a>
            <a class="btn">Right</a>
        </div>


    CSS:


    .btn-justified{
        display: inline-block;
        width: 100%;
        float: left;
    }

    .btn-justified .btn{
        display: table-cell !important;
        float: none;
        width: 1%;
    }

Upvotes: 1

Related Questions