Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
16918 Представления

How to insert line break in placeholder in text area field?

 

Аватар
Отменить

Hello ,

You get any solution because i am facing similar problem.

Лучший ответ

I am surprised no one came up with a working solution in the last 9 years.

You can simply add & # 1 0 ; (without spaces) to your placeholder text, browser will register it as line feed.

Аватар
Отменить
Лучший ответ

Is it possible ?? ;) Have you tried \n \r ?

Аватар
Отменить
Автор

yes tried that didn't work.

Лучший ответ

Only by formatting with multiple spaces, e.g.:

1st line of placeholder starts here                                         2nd starts here            etc    

If the size of textarea is fixed, browsers will show such long texts as if they were on multiple lines.

You'll have to fine-tune the number of spaces to make placeholder text look as you like.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
июл. 16
4319
0
июл. 16
5188
1
дек. 15
3744
1
нояб. 15
5187
1
янв. 24
15732