Randomblue
Randomblue

Reputation: 116293

Textarea width does not work, but offset does

This is my code (see fiddle here):

<div class='container'>
    <div class='row'>
        <div class='offset1 span5'>
            <textarea rows='3'></textarea>
        </div>
    </div>
</div>
<div class='container'>
    <div class='row'>
        <div class='offset1 span1'>
            <textarea rows='3'></textarea>
        </div>
    </div>
</div>

I expect both textareas to have different width, but they have the same width. How can I control both the offset and span features of Bootstrap for textareas?

Upvotes: 1

Views: 1563

Answers (1)

Shail
Shail

Reputation: 3649

There are two ways to do it -Jsfiddle for you Jsfiddle

Method 1: Uses of block level classes, Like

<textarea class="input-xxlarge" rows='3'></textarea>
<textarea class="input-large" rows='3'></textarea>
<textarea class="input-mini" rows='3'></textarea>

Method 2 :Grid Level resizing , Like

<textarea class="span12" rows='3'></textarea>
<textarea class="span6" rows='3'></textarea>

You can specify any span size according to your liking .

For your code you can use :

<div class='container'>
<div class='row'>
    <div class='offset1 span5'>
        <textarea class="input-large" rows='3'></textarea>
      </div>
    </div>
  </div>
  <div class='container'>
      <div class='row'>
    <div class='offset1 span1'>
        <textarea class="input-mini" rows='3'></textarea>

    </div>
    </div>
 </div>

Upvotes: 2

Related Questions