Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiline input form field using Bootstrap

<form class="span6">   <h2>Get In Touch</h2><br>   <input class="span6" type="text" placeholder="Your first name" required>   <input class="span6" type="text" placeholder="Your last name" required>   <input class="span6" type="email" placeholder="Your email" required>   <input class="span6" type="text" placeholder="Your phone number">   <input class="span6" type="text" rows="3" placeholder="What's up?" required><br>   <button type="submit" class="btn btn-primary">Submit</button>   <button type="clear" class="btn">Clear</button> </form><!--/.span6--> 

Here's my form I'm using in Bootstrap. I'm trying to make my last input field span 6 columns across and 3 rows down, but it's only showing as 6 columns across and 1 row down. Any ideas on how to make my input box larger? Thanks.

like image 365
Brian Avatar asked Jan 18 '13 17:01

Brian


1 Answers

I think the problem is that you are using type="text" instead of textarea. What you want is:

<textarea class="span6" rows="3" placeholder="What's up?" required></textarea> 

To clarify, a type="text" will always be one row, where-as a textarea can be multiple.

like image 149
Nick Mitchinson Avatar answered Sep 19 '22 05:09

Nick Mitchinson