Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
16970 Lượt xem

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

 

Ảnh đại diện
Huỷ bỏ

Hello ,

You get any solution because i am facing similar problem.

Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

yes tried that didn't work.

Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 16
4349
0
thg 7 16
5212
1
thg 12 15
3780
1
thg 11 15
5200
1
thg 1 24
15772