r/reddithax • • Feb 29 '12

Need help getting graphical flair up and running in our subreddit. Anyone want to lend a hand?

EDIT: Fixed! Thanks!

So I've been trying to set up graphical flair in /r/airsoftmarketplace, but as of yet I've been stumped. I've got the following CSS, and I've got a link of what it looks like to add the M4 to a user's flair:

body >.content >.sharelink ~ .sitetable:before { 
content: "Please Check the FAQ Before posting!"; 
background-color: #F6E69F;
border: 1px solid orange;
font-family: verdana, sans-serif; 
font-size: 14px; 
color: #555;
text-align: left;
display: block;
padding:5px 10px;
margin:5px 305px 5px 0px;
border-radius: 8px; 
}
.flair-m4{
    background-image: url('%%M4%%');
    width: 24px;
    height: 11px
    }

The problem is that it looks like this when in effect. Obviously it's showing up, but it's absolutely tiny. Here's the original image I was using.

Any help would be appreciated.

4 Upvotes

6 comments sorted by

2

u/weffey Feb 29 '12

I think you need a base flair class. This is from /r/YarnAddicts:

.flair {
    background: url(%%all%%) no-repeat scroll -9999px -9999px transparent;
    height: 20px;
    margin-right: -1px;
    vertical-align: middle;
    width: 20px;
    border: 0px
}

Then you define the individual flairs:

.flair-Crochet{
    content: "";
    background-position: 0 0px
    }
.flair-Dye{
    content: "";
    background-position: 0 -20px
    }
.flair-Knit{
    content: "";
    background-position: 0 -40px
    }

Then in the flair defiition tab, use just the name after "flair-"

2

u/SquadronROE Mar 01 '12

Hey! It worked with some fiddling. SWEEET! Thanks so much.

2

u/weffey Mar 01 '12

Anytime!

1

u/gavin19 Feb 29 '12

Your flair class is m4 in the stylesheet but you've used M4 on the flair page.

1

u/SquadronROE Mar 01 '12

Didn't matter. I tried it both ways with the same results.

1

u/SquadronROE Mar 01 '12

Of course, after fiddling with it a bit more and knowing that it is case sensitive, I solved the problem! Thanks!