MyBB Community Forums

Full Version: Where to Put This CSS?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay, well I found a tutorial on here on how to change the username color of a group for a specific theme using CSS, however, the tutorial isn't very clear and I need some things pointed out to me:

Quote:This may just be common sense for some, but it is something that I use and I find it very useful.

Have you ever wanted to have many colored usergroups and many colored styles, but didn't want the two conflicting with each other? Here is how you can do it.

Go to Users and Groups >> Manage Groups >> Administrators (or which ever group you want).

Find Usergroup Style. The default for this is:

Code:
<span style="color: green;"><strong><em>{username}</em></strong></span>
Delete all of this and replace it with:

Code:
<span class="administrator_name">{username}</span>
Now you can go to Themes >> Modify / Delete >> Pick a theme > Edit Theme Style. Scroll all the way to the bottom and find: Additional CSS.

In this area, put this at the very top:

Code:
/* USERGROUPS */
.administrator_name {
color: red;
text-decoration: underline;
font-weight: bold;
font-style: italic;
}

This will make everyone who is an admin have a red, bold, underlined, and italic username. You can play around with the colors and attributes to your needs. For more information on CSS, please go to W3's CSS Reference.

The whole point of this is to be able to have a different style per theme for your usergroups, so go edit your other styles. Maybe, if you have a redish theme, you will want your admins to show up green, and maybe on your blue themes where your admins are orange, you may want them to be a pink on your blue theme. Who knows, you are the admin, you make the choices!

Thanks for reading this resource,
Audentio
There are many places where the code in red could go, but I have no clue where the right spot would be. Would it also be possible to achieve Multi-Colored names using this?

Quote Source: http://mods.mybb.com/view-resource/chang...-per-theme
Go to Admin CP > Templates & Style > *your theme's name* > global.css > then paste that code in the bottom of it.
Or.... just attach a separate stylesheet...
http://yourforumlocation.com/admin/index...dule=style
Click on the theme you'd like to add this to.
Click "Add Stylesheet"

Here are the options you should choose.
File Name:
UsernameFonts.css

Attached To:
Globally

Write my own content


Then type in the code.

I think that this is a better idea than adding it to the Global stylesheet because it's more organized so you don't have to search the big file just to find it... just click!



Unfortunately, not (multicolor)
However, you can create a separate usergroup for each user and type out their name giving color