+ 1
How can i achieve the same functionality as the placeholder of input inside a editable div element? [Solved]
So i am trying to have the same placeholder thing for div element just like input element? What should i do ? I have tried span thing but didn't worked at all ,tried making blob of placeholder text and using it as image but that doesn't works as well ,so what else can I do ? Ty in advance Edit: before psuedo selector did helped me achieve my goal easily https://code.sololearn.com/WYfqfFsuHfRz/?ref=app
1 Resposta
+ 1
I think you can just use it the same way as an input tag <div type="text" placeholder="Enter text">