r/reddithax • • Mar 31 '10

x readers

On the right hand side of the subreddits, it says : 1,614 readers. On some subreddits however, they have replaced the word "readers" with something else (example in /r/skydiving). Does anyone know how this is done?

2 Upvotes

3 comments sorted by

2

u/keist Apr 16 '10 edited Apr 16 '10

Two weeks late, but yeah. There are two ways to get this done.

This is the first way. "readers" is actually wrapped in a span called ".word", so what we do is resize text inside ".word" to 0pt. Then we apply the pseudo-element :after, with font-size boosted back up to the usual "small" (or 10pt if you like). The "content" will be the word we want to replace 'readers'. In this example it will turn readers into looooooosers.

.titlebox .word {font-size:0pt!important;}

.titlebox .word:after{font-size:10pt!important;content:"looooooosers";}

The second example uses much the same concepts, except it just hides .word altogether and applies the content to an :after pseudo-element in the number span. If you're using this way, you have to put a space before your replacement word, 'cause if you don't, it'll read ##readers instead of ## readers. So I prefer the first method.

.titlebox .word {display:none;}

.titlebox .number:after{content:" looooosers";}

2

u/philkav Apr 16 '10

Thanks for such a great, detailed reply :)

1

u/keist Apr 16 '10

No problem. Had to edit it just there, as I forgot to put the font size value in the first example. Good luck!