简体   繁体   中英

Insert textarea writed in more than one line

I have a textarea and the text that i write is inserted in a p. I don't know why the text maked it's set in one line only, instead a few lines because i have an width with 300px. This only breaks the line and write in more than one line all the text if i press "enter" in the textarea to write more. For example, i write and if i press enter and write again, this breaks me the text in two lines, but i want to do this automatically, because the text it's wrapped in a p tag.

Solution: I need to apply word-break: break-word; to my p tag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM