MyBB Community Forums

Full Version: How to? change the link font in postbit?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to change the font color of links in postbit, hover, link and visited font color without affecting header and external links.

I want only the links in postbit font color to change?
1. Go to Admin CP > Templates & Style > Themes > Your Theme > global.css > Advanced Mode.

2. Add this at the bottom:

.post_body a:link {
	color: #000;
	text-decoration: none;
}

.post_body a:visited {
	color: #000;
	text-decoration: none;
}

.post_body a:hover, a:active {
	color: #000;
	text-decoration: none;
}

3. Change #000 to the color you want (e.g. #ff0000 for red).
faviouz, which link code do I want to change if I want the color of the hyperlink different from the normal font color of the page, is it the .post_body a:link~ ?

For clarification, I want the hyperlink to be a different color in the post line than all the other words, I don't want it to change when hovered, I want it to be a different color automatically when posted.
Follow the instructions in my post above and change all instances of #000 to the color you want.
Wow! Such a quick response, thanks.
I did as you suggested but it changed the font colors of several different things (buttons that have hover traits, headings, etc.). I experimented by changing the link button of each category one at time back to the original color but had to change them all back to the original to regain the original theme font colors.
Is there something else I could try?
I'm not sure what you mean. Would you care to elaborate? I made a small mistake though (most likely not the cause of your issue), so try this:

.post_body a:link {
    color: #000;
    text-decoration: none;
}

.post_body a:visited {
    color: #000;
    text-decoration: none;
}

.post_body a:hover, .post_body a:active {
    color: #000;
    text-decoration: none;
}
Perhaps being new at MyBB is part of the problem, I'm not sure what the term "postbit" means, maybe I posted in the wrong thread. What I want the board to do is automatically change the color of any hyperlink a person might add to their post.

Actually, I did not see any code that looked exactly like that which you posted, maybe I made the changes to the wrong code, I've seen other places with the "a:link" etc code. Here is where I made the changes to the global.css sheet (btw, I have changed the color back to the original):

/* END BGIMG */
a:link {
color: #ffffff;
text-decoration: none;
}

a:visited {
color: #ffffff;
text-decoration: none;
}

a:hover, a:active {
color: #ffffff;
text-decoration: underline;
}

#container {
No, you got it all wrong. You're not supposed to edit anything. The block of code you posted refers to all the links on the website (unless styled by a different element). What you need to do is add my code to the bottom of your CSS:

.post_body a:link {
    color: #000;
    text-decoration: none;
}

.post_body a:visited {
    color: #000;
    text-decoration: none;
}

.post_body a:hover, .post_body a:active {
    color: #000;
    text-decoration: none;
}
Wow/awesome! Another quick reply and just as I thought...meabigdummy! Your solution worked perfectly, thanks! Shy
Spent some time looking but apparently no one else needs this color change...I hope it is okay to post a similar but different need in this thread...Blush

Where do I go to change the color of the unread message notification text?

Will I need to add code somewhere or just modify the color code?

I've found a thread re: how to change the background color, but nothing regarding changing only the pm notification text color.

Thanks in advance.