Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
17513 Vizualizări

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

 

Imagine profil
Abandonează

Hello ,

You get any solution because i am facing similar problem.

Cel mai bun răspuns

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.

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

yes tried that didn't work.

Cel mai bun răspuns

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.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
iul. 16
4718
0
iul. 16
5539
1
dec. 15
4079
1
nov. 15
5417
1
ian. 24
16258