Change font color when it's an admin

Go down

Change font color when it's an admin

Post by Ahkrir on Sun 13 May - 23:32

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?
avatar
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 Sun 13 May - 23:38

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 ;-)
avatar
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 Sun 13 May - 23:42

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.
avatar
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 Sun 13 May - 23:45

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 :/
avatar
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 Sun 13 May - 23:49

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.
avatar
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 Mon 14 May - 9:04

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?
avatar
Ahkrir
Forumember

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

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

Back to top Go down

Back to top


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