Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text wrapping in input area (HTML) [duplicate]

Tags:

html

I currently have the following code:

<div class="input-group">
    <label>Some input</label>
    <input type="text" name="var_1">
</div>
<div class="input-group">

However, I would very much like to wrap the input text, I have tried to use div class = "text-area" however then as far as I can tell I lose the format, and the input area does not come on a new line. Is there any simple way to fix this or do I have to go with text area? I have looked at this previous post, which is where I got the text-area idea: Wrapping text inside input type="text" element HTML/CSS

like image 219
no nein Avatar asked Jan 26 '26 15:01

no nein


1 Answers

You have to use textarea in that case. Try this:

<div class="input-group">
    <label>Some input</label>
    <textarea name="var_1" rows="5" cols="10" wrap="soft"></textarea>
</div>

you can change number of row and cols to customize textarea input field size.

like image 190
Abdus Sattar Bhuiyan Avatar answered Jan 29 '26 03:01

Abdus Sattar Bhuiyan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!