Attention:

Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

  Add ReplyNew TopicNew Poll

 using member group prefix colours for backgrounds
#
hi! so i've recently begun coding a mini-profile for the first time. i've had an idea of what i wanted a certain part of it to look like -- a line of white text with a #membergroupcolour background that (when hovered over) transforms into a white background with #membergroupcolour text. basically an inverse effect. pretty simple to code outside of the mini-profile, so i figured it would be the same...

obviously that wasn't the case l-lol

i found out that the variable for member group colours can't replace a hexcode. as in the <!-- |prefix| --> and <!-- |suffix| --> variables can't be used in this ---> color: #hexcode or background-color: #hexcode

technically i could just surround the text on the white background with the prefix/suffix variables -- but that doesn't fix the other version, where the member colour needs to be the background colour. is it true that the prefix/suffix variables can't change the colour of a background/anything that's not text? is there any way to work around this? i hope i explained everything properly. if not, tl;dr=i want the background-color to change depending on the member group.

thanks. c:
PM
#
I think I understand what you're saying but you may be complicating things by attempting to use this variables do it in the way you wish.

Are you saying that you tried to use <!-- |prefix| --> and <!-- |suffix| --> variables as part of css attributes - e.g. entered #000 as a prefix and tried to use it like so:

CODE
background-color: <!-- |prefix| -->;


This will really cause all sorts of problems and wasn't the intended use really - if you are looking to configure certain pieces of css to be different per-member group, then it would be easier to instead use the <!-- |g_id| --> identifier.

For example, you can do this in the mini profile:

CODE
<div class='member-goup-mpcolor-<!-- |g_id| -->'>stuff here</div>


As an example, root admin members have group ID 4. So, you can use this identifier to put this into your stylesheet:

CODE
/* Admin colors */
.member-goup-mpcolor-4 { background-color: #000; color: #fff }


You can then do this for every member group and it's a lot more flexible and easier to use.

Makes sense?

signature
email: admin@jcink.com :: blog: John C.
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

Options Add ReplyNew TopicNew Poll