-4

I would like to wrap some text in <input> tag. When I use word-wrap: break-word, its doesn't work.

enter image description here

andreas
  • 16,357
  • 12
  • 72
  • 76
Eduard Arevshatyan
  • 648
  • 3
  • 18
  • 34

1 Answers1

2

Due to the specification, it's not possible to break lines in an input field:

Text with no line breaks

Instead you will have to use a <textarea> (because it is the text input element that is made for line breaks), e.g.:

<textarea rows="10" cols="30"></textarea> 
andreas
  • 16,357
  • 12
  • 72
  • 76