The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How can I give a specific user a different colored avatar border ("everywhere")?

4 posters

Go down

Solved How can I give a specific user a different colored avatar border ("everywhere")?

Post by Friendly Toucan March 23rd 2023, 3:03 pm

bye Hello,

I am currently using this code:

Code:
.postprofile dt a[href="/u###"] img { border-color: #ffffff; }

This changes the color of the border in posts/threads.

How can I change it in all other places (except memberlist)? Like the big avatar in "profile pages", the smaller ones in the "friends section", and in the "users who participated in thread"-section, and so on... Question

Thanks.
Friendly Toucan
Friendly Toucan
Forumember

Posts : 243
Reputation : 4
Language : English

https://cerulean-blues.forumotion.com

Back to top Go down

Solved Re: How can I give a specific user a different colored avatar border ("everywhere")?

Post by tikky March 23rd 2023, 3:22 pm

Hello @Friendly Toucan,

The easy way to do is
Code:
a[href="/u###"]:not(.profile-icon) img { border-color: #ffffff; }
#memberlist a[href="/u###"] img { border-width: 0 !important; }
In profile and others parts it's difficult with css
tikky
tikky
Forumember

Posts : 922
Reputation : 159
Language : 🇵🇹

https://www.forumotion.com/create-forum/modernbb

Ape, sivastar and TonnyKamper like this post

Back to top Go down

Solved Re: How can I give a specific user a different colored avatar border ("everywhere")?

Post by Friendly Toucan March 24th 2023, 1:55 am

Hey,

Thanks for trying to help, too bad that code didn't really change any additional borders than the code I was already using. :/

pedxz wrote:In profile and others parts it's difficult with css

"Difficult", meaning it's still possible? blackeye

I also tried:

Code:
img[src*="the-user's-avatar.png"] { border-color: #ffffff; }

This also changed the border of the big avatar in the profile page. Still haven't figured out how to do this for the avatars in the "friends section", and the avatars in "who participated in topic"-section. Exclamation
Friendly Toucan
Friendly Toucan
Forumember

Posts : 243
Reputation : 4
Language : English

https://cerulean-blues.forumotion.com

Back to top Go down

Solved Re: How can I give a specific user a different colored avatar border ("everywhere")?

Post by tikky March 24th 2023, 2:36 am

Friendly Toucan wrote:Thanks for trying to help, too bad that code didn't really change any additional borders than the code I was already using. :/
Other than the posted code from the first message I don't know what was added. The forum is closed for guests which complicates

pedxz wrote:In profile and others parts it's difficult with css

"Difficult", meaning it's still possible? blackeye
Ya by editing template, using a script or do what you have done below and use the image as a reference

This also changed the border of the big avatar in the profile page. Still haven't figured out how to do this for the avatars in the "friends section", and the avatars in "who participated in topic"-section. Exclamation
Code:
a[href="/u###"] > .avatar > img {
    border-color: red !important;
}

[title="USERNAME"].poster::before {
    border-color: red !important;
}
Replace
Code:
USERNAME
by the username
tikky
tikky
Forumember

Posts : 922
Reputation : 159
Language : 🇵🇹

https://www.forumotion.com/create-forum/modernbb

sivastar and Friendly Toucan like this post

Back to top Go down

Solved Re: How can I give a specific user a different colored avatar border ("everywhere")?

Post by Razor12345 March 24th 2023, 10:06 am

Good afternoon!

1) I suggest using another property:

Code:
img[src="IMAGE LINK"] {
  border: 5px solid red;
}

Result:

How can I give a specific user a different colored avatar border ("everywhere")? Screen56

How can I give a specific user a different colored avatar border ("everywhere")? Screen55

How can I give a specific user a different colored avatar border ("everywhere")? Screen54

2) I can also suggest a way of defining the image with "alt":

Code:
img[alt="Admin"], img[alt="test 1-14"] {
  border: 5px solid red;
}

The 'alt' value of an avatar is either a nickname or a randomly generated value:

How can I give a specific user a different colored avatar border ("everywhere")? Screen58

How can I give a specific user a different colored avatar border ("everywhere")? Screen57

You need to check your 'alt' value

The standard border design will have priority in the users list. Otherwise, you can use this code to remove the borders:

Code:
a.tooltipstered img {
  border: none;
}
Razor12345
Razor12345
Support Moderator
Support Moderator

Male Posts : 1575
Reputation : 266
Language : Ukr, Rus, Eng
Location : Ukraine

sivastar and Friendly Toucan like this post

Back to top Go down

Solved Re: How can I give a specific user a different colored avatar border ("everywhere")?

Post by Friendly Toucan March 24th 2023, 5:59 pm

Hello again,

The border color is now changed in all different avatar locations.

Big thanks to all who helped! Very Happy

Marking this as "solved".
Friendly Toucan
Friendly Toucan
Forumember

Posts : 243
Reputation : 4
Language : English

https://cerulean-blues.forumotion.com

Back to top Go down

Solved Re: How can I give a specific user a different colored avatar border ("everywhere")?

Post by Ape March 24th 2023, 6:12 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


How can I give a specific user a different colored avatar border ("everywhere")? Left1212How can I give a specific user a different colored avatar border ("everywhere")? Center11How can I give a specific user a different colored avatar border ("everywhere")? Right112
How can I give a specific user a different colored avatar border ("everywhere")? Ape_b110
How can I give a specific user a different colored avatar border ("everywhere")? Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19325
Reputation : 2005
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum