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

What am I missing?

Discussion in 'Styling and Customization Questions' started by Slavik, Feb 14, 2012.

  1. Slavik

    Slavik XenForo Moderator Staff Member

    To do the following as per the screenie, change the background from blue to red.

    red.png

    I've added this to the usergroup styling, but it 'aint working :(


    Code:
    .messageUserBlock a.username {
        background: url("styles/p8ntballer/xenforo/xenfocus/maintitle.png") repeat-x scroll 0 50% #CC1111;
    }
     
  2. Fuhrmann

    Fuhrmann Well-Known Member

    Have you tried to insert !important?

    Code:
    .messageUserBlock a.username {
    background: url("styles/p8ntballer/xenforo/xenfocus/maintitle.png") repeat-x scroll 0 50% #CC1111 !important;
    }
    
     
  3. Slavik

    Slavik XenForo Moderator Staff Member

    Still no dice :(
     
  4. Fuhrmann

    Fuhrmann Well-Known Member

    I'll take a look at your site! Maybe I can help.
     
  5. Fuhrmann

    Fuhrmann Well-Known Member

    Try this!

    Code:
    .messageUserBlock a.username {
        background: #CC1111 url("styles/p8ntballer/xenforo/xenfocus/maintitle.png") repeat-x scroll 0 50% !important;
    }
     
  6. Slavik

    Slavik XenForo Moderator Staff Member

    nope! :(
     
  7. Fuhrmann

    Fuhrmann Well-Known Member

    Oh (n)
     
  8. CyclingTribe

    CyclingTribe Well-Known Member

    I could be wrong, but doesn't ...
    .messageUserBlock a.username
    ... mean the styling for an anchor/link of the users name? Could that be the problem - it's the wrong element?
     
  9. steel_curtain

    steel_curtain Well-Known Member

    Try adding this to extra.css to apply to admins and mods

    http://xenforo.com/help/user-group-styling/

    Code:
    .staff .messageUserBlock a.username {
        background: url("styles/p8ntballer/xenforo/xenfocus/maintitle.png") repeat-x scroll 0 50% #CC1111;
    }
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This is the relevant CSS in the source:

    Code:
    .messageUserBlock a.username {
    font-weight: bold;
    color: white;
    text-decoration: none;
    padding-top: 8px;
    padding-bottom: 8px;
    margin: -1px;
    border-top-left-radius: 3px;
    -webkit-border-top-left-radius: 3px;
    -moz-border-radius-topleft: 3px;
    -khtml-border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    -webkit-border-top-right-radius: 3px;
    -moz-border-radius-topright: 3px;
    -khtml-border-top-right-radius: 3px;
    display: block;
    overflow: hidden;
    line-height: 16px;
    text-align: center;
    text-shadow: 0 0 0 transparent, 0 1px 0 rgba(0, 0, 0, 0.8);
    background: #014980 url('styles/p8ntballer/xenforo/xenfocus/maintitle.png') repeat-x 0% 50%;
    }
    
    So this should work:

    Admin CP -> Appearance -> Templates -> EXTRA.css

    Code:
    .messageUserBlock a.username
    {
    	background-color: red !important;
    }
    
     
  11. EQnoble

    EQnoble Well-Known Member

    Is this supposed to be for all usergroups or one specifically?
     
  12. EQnoble

    EQnoble Well-Known Member

    if you want to use that image use this
    Code:
    div.messageUserBlock a.username {
     
    background: url("styles/p8ntballer/xenforo/xenfocus/maintitle.png") repeat-x scroll 0 50% #CC1111;
     
    }
     
  13. Slavik

    Slavik XenForo Moderator Staff Member


    Whilst this works site wide, I am trying to do it per usergroup basis.

    Eg Admins would be Red
    Moderators blue
    Premium members Grey
    etc.

    Any suggests?
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    See this post:

    http://xenforo.com/community/threads/various-postbit-colors-by-usergroups.22193/#post-278785

    Once you have applied the extra classes to the message template then you can use CSS like this:

    Code:
    .message.group5 .messageUserBlock a.username
    {
    	background-color: red !important;
    }
    
     
  15. Slavik

    Slavik XenForo Moderator Staff Member

    Fuhrmann likes this.

Share This Page