1

I want to do a placeholder as I have attached a photo below

enter image description here

I have tried a few way but they didn't work, Is there any way to do like that.

1 Answers1

3

It's fairly simple to achieve that by using pseudo-css-classes for the placeholder:

textarea::-webkit-input-placeholder {
    /* design first line here */      
    font-size: 2em;
}

textarea::-webkit-input-placeholder::after {
    /* design second line here */
    display:block;
    content:"Please note that we do not work...";
    font-style:italic;
    font-size: .6em;
    margin-top: 20px;
}
<textarea placeholder="Message" rows="10" cols="50"></textarea>

Unfortunately, you have to repeat the code for all browsers, using commas won't work:

textarea::-webkit-input-placeholder { code... }
textarea:-moz-input-placeholder { code... }
textarea::-moz-input-placeholder { code... }
textarea:-ms-input-placeholder { code... }
vigonotion
  • 1,164
  • 2
  • 10
  • 21