0

I have a fiddle in which I am trying to make the input box bigger.

I was able to make it bigger but for some reasons the writing cursor starts from the middle of a box whereas I want it to start from the extreme top-left of the input box so that I can write more content in it similar to this.

The CSS which I am using to make the input box bigger is:

input 
{
    padding: 3px;
    width: 320px;
    height: 120px;
}

I am not sure what changes do I need to make in my HTML (in the fiddle) and CSS for the writing cursor to start from the extreme left in the input box.

john
  • 11,311
  • 40
  • 131
  • 251
  • 3
    For multi-line input, I suggest using [` – showdev Oct 16 '17 at 18:20
  • 1
    Possible duplicate of [Multiple lines of input in ](https://stackoverflow.com/questions/6262472/multiple-lines-of-input-in-input-type-text) – showdev Oct 16 '17 at 18:22

3 Answers3

2

Why not just creating a textarea? See the fiddle here

Orlandster
  • 4,706
  • 2
  • 30
  • 45
2

You could try to get the text up by using the padding-bottom attribute

input 
{
  padding: 3px;
  width: 320px;
  height: 20px;
  padding-bottom: 100px;
}

But what you probably want to use, instead of an input is a textarea just like in the example you mentioned if you want to have multiline text.

<textarea name="text" cols="25" rows="5">
Add multiple lines of text here and watch the scrollbars grow...
</textarea>
mxmtsk
  • 4,285
  • 6
  • 22
  • 47
  • it worked. I am wondering what I have to put in asp. I am using the following code:
    `
    ` Instead of TextBox, I think I have to put something else but I am not sure what I have to put.
    – john Oct 16 '17 at 20:00
  • @david — I googled "asp tag textarea" and found [textarea control, asp.net c#](https://stackoverflow.com/a/4508102/17300) here on SO, which says to use `` – Stephen P Oct 16 '17 at 20:10
0

I was facing the same problem as you, and we fixed that using the tag textarea rather than using input tag.

My problem was solved.

dgebert
  • 1,235
  • 1
  • 13
  • 30