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.
The forum of the forums
2 posters

    How to display a users user group when hovered over?

    Ramdaman
    Ramdaman
    Active Poster


    Male Posts : 1590
    Reputation : 99
    Language : English, Albanian, Macedonian, Russian | HTML, CSS
    Location : New York City

    Solved How to display a users user group when hovered over?

    Post by Ramdaman August 30th 2014, 11:38 pm

    Is there a way if you hover over a users name, that the displayed group that user is in will show in text by your cursor? Thanks.


    Last edited by Ramdaman on August 31st 2014, 1:03 am; edited 1 time in total
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: How to display a users user group when hovered over?

    Post by Ange Tuteur August 30th 2014, 11:51 pm

    Hello Ramdaman,

    You can use the following trick with CSS :
    Display > Colors > CSS stylesheet
    Code:
    a span[style="color:#990099"] strong:hover:after {
     Â content:"Moderator";
     Â font-size:10px;
     Â color:#000;
     Â background:#FFF;
     Â border:1px solid #EEE;
     Â box-shadow:1px 1px 2px #000;
     Â border-radius:4px;
     Â padding:3px;
     Â position:absolute;
     Â bottom:5px;
     Â right:0px;
     Â display:inline-block;
     Â white-space:nowrap;
     Â z-index:1;
     Â margin:-25px;
    }
    a span[style="color:#990099"] strong { position:relative }

    So it applies to the group you want it to, you must change #990099 to the color of your group. You can see the hex color of your groups here :
    Administration Panel > Users & Groups > Groups > Group Administration

    How to display a users user group when hovered over? Captu183

    The last thing to change is the texts displayed : content:"Moderator"; Change Moderator to the texts you want to display.

    To have it for multiple groups simply repeat the steps above.
    Ramdaman
    Ramdaman
    Active Poster


    Male Posts : 1590
    Reputation : 99
    Language : English, Albanian, Macedonian, Russian | HTML, CSS
    Location : New York City

    Solved Re: How to display a users user group when hovered over?

    Post by Ramdaman August 31st 2014, 12:47 am

    Ah solved, so I must keep every group color different for this to work?
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: How to display a users user group when hovered over?

    Post by Ange Tuteur August 31st 2014, 12:55 am

    Correct, you will need multiple codes. You can also put the content in its own rule and add the selectors to the popup style so it takes less space. However, I think multiple codes will be easier if you're not familiar with CSS.
    Ramdaman
    Ramdaman
    Active Poster


    Male Posts : 1590
    Reputation : 99
    Language : English, Albanian, Macedonian, Russian | HTML, CSS
    Location : New York City

    Solved Re: How to display a users user group when hovered over?

    Post by Ramdaman August 31st 2014, 1:02 am

    Not familiar with CSS, so this will do. Thanks again mam. Smile
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: How to display a users user group when hovered over?

    Post by Ange Tuteur August 31st 2014, 1:24 am

    You're welcome ^^

    Topic archived

    With multiple codes you can also personalize the style of each group tooltip. ( e.g. background color, font color.. )

      Current date/time is September 22nd 2024, 2:32 pm