MyBB Community Forums

Full Version: Change Global Announcement Font/text color
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've searched high and low, but been unable to find a answer to this simple question.

How do i make the global announcement text red instead of being black like the other normal topics?

see Photoshopped picture.
[attachment=28499]
You might not have found an answer because it's actually a bit more complicated than it should be. So, here's how you do it.

Go into your theme's templates (Templates and Style > Templates > [themename Templates]) and click on Forum Display Templates > forumdisplay_announcements_announcement. In that template, you should see the code:
<a href="{$announcement['announcementlink']}"{$new_class}>{$announcement['subject']}</a>

Add a class of "announcement-link" to it:
<a class="announcement-link" href="{$announcement['announcementlink']}"{$new_class}>{$announcement['subject']}</a>

After you've done that, save the template and go into your theme's global.css (Templates and Style > Themes > [themename] > global.css) and add in this CSS at the bottom:
a.announcement-link {
    color: #ff0000;
}

Save the file and you should be good Smile
Go to your forumdisplay_announcements_announcement, and find the following:
<a href="{$announcement['announcementlink']}"{$new_class}>{$announcement['subject']}</div></a>
Replace it with:
<a href="{$announcement['announcementlink']}"{$new_class}><div class="announcements">{$announcement['subject']}</div></a>
And then go to your global.css and add:
.announcements {
color: red;
}

// EDIT: sniped. Sad
Thanks works great. Is there anyway of making it bold as well?
Yeah, add this before the ending colon in the CSS portion you added.
font-weight:bold;
(2013-02-04, 03:54 AM)pandaa Wrote: [ -> ]Yeah, add this before the ending colon in the CSS portion you added.
font-weight:bold;

Thanks. Big Grin