Is it possible to put a text watermark on the background of a textarea or would it have to be done with an image?
Printable View
Is it possible to put a text watermark on the background of a textarea or would it have to be done with an image?
using css you can just add background:url("<img_location>");
Edit:
didn't read your question properly.
Thats with an image, don't know about using text.
I have never seen it, so it's probably not possible.
I did have a minor brainstorm right now though, you could have an IFRAME, make it editable, give it the SRC of a page with a background you want. However, that'd be too much effort. :)
You could, in browsers that support CSS3, give the text area a partially transparent background colour and position it directly on top of an element containing the text. Opera might support this, I'm pretty sure that as of now, no other browser does.
An alternative ot the background colour, you could give a 1-pixel large PNG with that partially transparent colour. This will work in all browsers that support partially transparent PNGs, namely everything but IE. IE7 will support it. You can trick IE6 into supporting it, by using the proprietary filter: property.
The hardest part is positioning the text area and the text watermark right on top of each other, without losing their position in the flow.