One more | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

One more

Hey again, I just posted a question, but now I have one more. I have a teaxtarea in my site, but the "placeholder" and even "value" attribute doesnt show anything in the textbox, so its impossible for me to give a hint to the user. Im trying with placeholder="text" and value="text"... Maybe I broke something with the CSS, but cant understand what. HTML: <textarea placeholder="test" rows="4" cols="45"> </textarea> CSS: textarea { border: 2px solid goldenrod; border-radius: 15px; background-color: ghostwhite; resize: none; } Thanks in advance!

17th May 2017, 5:35 PM
Dimityr Atanasov
Dimityr Atanasov - avatar
3 Answers
+ 9
ahhh...common problem with textarea... easy fix tho don't put the closing tag </textarea> in a new line, but immediately after the opening tag <textarea ....> Good <textarea></textarea> Bad <textarea> </textarea>
17th May 2017, 5:41 PM
Burey
Burey - avatar
+ 5
no probs i had this exact same problem in the code below took me some doggin' to find the cause.... https://code.sololearn.com/WrIEkSl10B7e/?ref=app
17th May 2017, 5:59 PM
Burey
Burey - avatar
+ 1
Wow! It works perfectly now. After I saw your comment I move the </textarea> on the same line, but there was 1 space break between the tags and it show me the text after I hit backspace in the textarea, after this I put them next to each other exactly how you say without any space and now works perfectly. Thanks a lot !
17th May 2017, 5:53 PM
Dimityr Atanasov
Dimityr Atanasov - avatar