XF 1.5 How can I add styling to a specific user?

Achromatic

Member
Hey folks. Say I wanted to add CSS styling to a specific user, like adding CSS to just their profile - how would I do that? What would the code be?

Thank you. :)
 
you can use this condition to add a new class to the class you want to style using this

Code:
<xen:if is="{$visitor.user_id} == x">

</xen:if>

and style the new class withing the condition
 
you can use this condition to add a new class to the class you want to style using this

Code:
<xen:if is="{$visitor.user_id} == x">

</xen:if>

and style the new class withing the condition

The problem is, this code will only SHOW to a specific user. I want to append code to a specific user that shows to everyone.

So for example, let's say I wanted to make the text on your profile red, but only your profile. I want this to show to every user, including you. How would I do this?

I found out you can apply styling to specific posts like this:
li#post-473626 {
color: red;
}

So how would I do that with a users profile?
 
Last edited:
The problem is, this code will only SHOW to a specific user. I want to append code to a specific user that shows to everyone.

So for example, let's say I wanted to make the text on your profile red, but only your profile. I want this to show to every user, including you. How would I do this?

I found out you can apply styling to specific posts like this:
li#post-473626 {
color: red;
}

So how would I do that with a users profile?
I think this will need an add-on
 
Huh, no addon needed. In the member_view template, just add something like

HTML:
<xen:if is="{$user.user_id} == X">

</xen:if>
And within that if goes your css. Don't remember how it was done in 1.5 though.
 
Back
Top Bottom