Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

What's the CSS for adding background image in the text box?

$
0
0

See r/RaidSecrets.

I quote gavin19's comment. See also gavin19's comment here.

It's just an image. So you need to make an image at 500x100px with the desired text on it then upload it to your subreddit.

The CSS

.commentarea > .usertext textarea { background-image: url(%%img-name%%); }.commentarea > .usertext textarea:focus { background-image: none; }

After replacing %%img-name%%,, I pasted this in my subreddit's stylesheet. But the image didn't show up in the text box.

I tried to search for this code in r/RaidSecrets's stylesheet, and found this in the lower half of the page. But it differs from the code above! Which is correct?

.commentarea .usertext textarea:not(:focus){background: url(%%usertext-textarea%%) no-repeat 50% 50%;background-color: rgba(71,87,104,.08); }

Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>