The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Change font color when it's an admin

View previous topic View next topic Go down

Change font color when it's an admin

Post by Ahkrir on May 13th 2012, 10:32 pm

So I am using this text in a javascript code:

Code:
$(function() {
$('div.post:has(".sp"), div.postmain:has(".sp")').css('background-color','#18405E');
});

But since you can't really read black on that color, I wanted to change the color to white.
I tried using:
Code:
$(function() {
$('div.post:has(".sp"), div.postmain:has(".sp")').css('background-color','#18405E');
('color','#FFFFFF');
});

And also font-color or text-color etc.. but they all don't work.
I'm sure there is a solution for this?

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Re: Change font color when it's an admin

Post by Ahkrir on May 13th 2012, 10:38 pm

Rideem3 wrote:The second code you wrote doesn't follow the jQuery protocol. That's why it's not working. Wink

You can do this:
Code:
$(function() {
$('div.post:has(".sp")').addClass('specialpost');
});

Then put this in your CSS StyleSheet:
Code:
.specialpost {
background-color: #18405E;
color: #FFFFFF;
}

The font does change now, byt my background doesn't ;-)

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Re: Change font color when it's an admin

Post by Ahkrir on May 13th 2012, 10:42 pm

Still not how it should.
Now I get this:
http://i47.tinypic.com/j7d9vq.png

Normally left is white and the text in the message does turn white but look left, still grey.

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Re: Change font color when it's an admin

Post by Ahkrir on May 13th 2012, 10:45 pm

Rideem3 wrote:Okay, then try this JS Code:
Code:
$(function() {
    $('div.post:has(".sp"), div.postmain:has(".sp")').addClass('specialpost');
    });

YES ALMOST!! Only the text left is still grey :/

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Re: Change font color when it's an admin

Post by Ahkrir on May 13th 2012, 10:49 pm

Rideem3 wrote:Change the CSS to this:
Code:
.specialpost {
        background-color: #18405E !important;
        color: #FFFFFF !important;
        }

Still the same :$
http://smarterweb.go-board.com/t5-edjbsjdfhjs <-- so you can see yourself.

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Re: Change font color when it's an admin

Post by Ahkrir on May 14th 2012, 8:04 am

I found out the name of my info.
It is: div.user-info
Any way to change that font-color via that javascript or css?

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

View previous topic View next topic Back to top


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