0

I am able to increase the height of my form for question, however the text isnt contained to the box. typing keeps going across not down to the next line to stay in the box.

just used height set to 150px in css.

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>


<form>
  <div class="form-group">
    <label for="exampleInputEmail1">Email address</label>
    <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
  </div>
</form>
<form>
  <div class="form-group enter-question">
    <label for="exampleInputEmail1">Enter your question: </label>
    <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
  </div>
</form>
H Wu
  • 53
  • 1
  • 9

1 Answers1

1

Sounds like you want to be using a textarea:

<form>
  <div class="form-group">
    <label for="exampleInputEmail1">Email address</label>
    <textarea type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email"></textarea>
  </div>
</form>
<form>
  <div class="form-group enter-question">
    <label for="exampleInputEmail1">Enter your question: </label>
    <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
  </div>
</form>

Please see this jsfiddle: https://jsfiddle.net/z66oo7hw/

Textarea will allow the user to write on more than one line, and you can specify the height of it yourself then.

jock.perkins
  • 469
  • 6
  • 23