Birger
Birger

Reputation: 4353

Twitter Bootstrap nested form

I just started with Twitter Bootstrap and can't find out how to do this. I want to create a form with the following layout:

+---------+ +---------------------------+
| input 1 | |                           |
+---------+ |                           |
+---------+ |                           |
| input 2 | |      textarea             |
+---------+ |                           |
+---------+ |                           |
| input 3 | |                           |
+---------+ +---------------------------+

I can find some examples on how to nest controls horizontal with the grid system (like this), but for the vertical nesting of controls I couldn't find anything.

Is it possible to create a layout like this without using a table?

Upvotes: 1

Views: 866

Answers (1)

Kylie
Kylie

Reputation: 11749

Just wrap the 3 in a <div class="span2">

And the textarea in a <div class="span5">

Or whatever ratio, brings about your desired result....

Like So...

<div class="row-fluid span12">
  <div class='span2'>
       <div control-group....>
       <input...> 
       <input...>
       <input...>
       </div>
 </div>
 <div class="span5">
      <textarea></textarea>
 </div>
</div>

Upvotes: 3

Related Questions