XF 1.5 .styleID not working in EXTRA.css

Hello guys,
First i would like to tell you sorry for my bad english i'm french...

I just installed xenforo, i love it so much but I have a problem. I would like to add Fontawesome icons before usernames of certain groups.

Here is my code :
Code:
.username .style3:before {
content: "\f005";
font-family: FontAwesome;
margin-right: 4px;
display: inline-block;
-webkit-transition-duration: 0.8s;
-moz-transition-duration: 0.8s;
-o-transition-duration: 0.8s;
transition-duration: 0.8s; 
 
}
.username:hover .style3:before {
  -webkit-transform: rotate(360deg);
  -moz-transform: rotate(360deg);
  -ms-transform: rotate(360deg);
  -o-transform: rotate(360deg);
}
It doesn't work for the admin group (which ID is 3). I tried with moderators and other groups... Same problem.
If i try to apply it for all the members by modifiyng the first line like this :
Code:
.username:before {
It works ! But all the usernames have it...

I've seen that other members encounter the same problem for exemple @ArtG : User Group Markup (Username CSS)

No solution have been found ? Can anyone help me ?
Thank you very much guys.
 

Arty

Well-known member
Space between .username and .style3 means you are targeting item with class "style3" that is inside element with class "username". So you are targeting wrong item.

You need to remove that space, so it would be ".username.style3". No space means you are targeting element that has both class '"username" and class "style3".
 
Hello @Arty thank you for your help ! I'll know that for the future.
Unfortunately i still have the same problem :(

I tried something else and it worked but i don't think it's correct...
In Name CSS i tried to add the line
Code:
.style3
And surprinsingly it works :-/

Is it wrong to do that ? Thank you
 

Arty

Well-known member
I was wrong. Checked it, style3 is inside username, those are 2 separate elements, so code should have worked. Ignore my previous post.
 
No problem.
Yeah it should but it doesn't :-/
It only work if i add
Code:
.style3
to name css like i show on the screen
 
Top