Tree Nguyen
Tree Nguyen

Reputation: 1199

Make textarea fullsize

I'm doing some kinds of form and I have this problem.

I'm planning to divided my page into 3 columns (2 aside with pic and the middle will have a little form. So I put the textarea in the form and but the column and row number in the HTML file. However, when I try to format the scale of the column, the problem pops up. The size of the column is not the size of textarea. Anyway for me to make the textarea full size, compatible with the column?

This one is the one where I get rid of the column part

    #left,

    #right,

    #form {

      width: 31%;

      float: right;

    }
<section id="left">
  <img src="./image/left.JPG" />
</section>
<section id="form">
  <form>
    <textarea id="message" rows="4" width="120"></textarea>
  </form>
</section>
<section id="right">
  <img src="./image/right.JPG" />
</section>

Upvotes: 0

Views: 91

Answers (1)

Shriike
Shriike

Reputation: 1341

#left, #right, #form
{
    width: 31%;
    float: right;
}
<section id="left"><img src="./image/left.JPG"/></section>
<section id="form">
    <form>
        <textarea id="message" rows="4" style="width:100%;" ></textarea>
    </form>
</section>
<section id="right"><img src="./image/right.JPG"/></section>

If you set the width to 100% for your text area then it will fill the area that it is in.

Upvotes: 1

Related Questions