1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Font Awesome Unicode After Usernames for Certain Groups?

Discussion in 'Styling and Customization Questions' started by BazzBerry, Jan 6, 2014.

  1. BazzBerry

    BazzBerry Member

    Hi there. I'm trying to figure out how I could do this - I'm wanting to place Font Awesome icons after a username; but only if they're a member of a certain group.

    I had it working by placing this in the extra.css:

    Code:
    a.username:after {
        font-family: FontAwesome;
        font-size: 12px;
        content: '\f132';
        font-weight: normal;
        padding-left: 3px;
    }
    However, obviously, that makes it show for everybody. I'm a little unsure of how to call it for only a certain group. I'm assuming I'll have to add different bits in EXTRA.css for each usergroup (much like it's done for user banners) but I can't figure it out. I'm by no means amazing with CSS.

    This is how the code above shows:
    [​IMG]

    Now I just need to figure out how I can make it so it's only called for certain usergroups, and where to call it.

    Thanks!
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. BazzBerry

    BazzBerry Member

    Thanks for that - I'm not exactly sure where I'd place those lines, though. I want it to show everywhere on the forums that their username would be displayed - would I have to go through every template individually and add it?
     
  4. Sage Knight

    Sage Knight Well-Known Member

    Here's what I would do:

    Code:
    .username .styleXX {
    
    }
    Where XX is the usergroup ID for the group, in your case just add it as such

    Code:
    .username .styleXX:after {
    
    }
     

Share This Page