Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

two forms side by side

I started using Twitter Bootstrap and trying to place two forms side by side. By default if I place two forms on the page they follow one after another, what attribute should I apply to place these forms side by side with 50% width.

like image 579
Tomas Avatar asked Aug 10 '12 09:08

Tomas


1 Answers

You can use the grid features of twitter bootstrap. Something like:

<div class="row">
    <div class="span6">
        <form>[...]</form>
    </div>
    <div class="span6">
        <form>[...]</form>
    </div>
</div>

EDIT:

with Twitter Bootstrap 3.x

<div class="row">
    <div class="col-sm-6">
        <form>[...]</form>
    </div>
    <div class="col-sm-6">
        <form>[...]</form>
    </div>
</div>

nb: in col-sm-6, sm stands for small, it means this grid will apply only for devices with a viewport larger than 768px (with TWBS default settings)

like image 198
Antoine Avatar answered Nov 26 '22 14:11

Antoine