0

I have this textarea:

 <textarea class="readonly" type="text" disabled>123456789 - JPP Bla bla bla lba Teest</textarea>

So what i want if its small text to have one row (like input), but if i have more text to add rows automatically. I dont want to use jquery, only css and html. Any suggestion?

None
  • 8,817
  • 26
  • 96
  • 171
  • Possible duplicate of [Creating a textarea with auto-resize](https://stackoverflow.com/questions/454202/creating-a-textarea-with-auto-resize) – Peter B Jun 29 '17 at 07:56

1 Answers1

0

You cant do it only by using CSS and HTML, some kind of javascript must be involved...

https://www.impressivewebs.com/textarea-auto-resize/

Edin
  • 32
  • 8
  • this is not one row on start – None Jun 29 '17 at 07:55
  • Well u can put default height in that case, but if u want to resize, javascript needs to be involved – Edin Jun 29 '17 at 07:56
  • do u have example with javascript? but not jquery only javascript because im using anuglar i dont want to mix jquery and angular – None Jun 29 '17 at 07:57
  • They are really similar, you can adjusted the code in 10 minutes, jquery is initially javacript... – Edin Jun 29 '17 at 08:01