<img height="1" width="1" style="display:none" src="https://q.quora.com/_/ad/10b616b60fad4a51aa023ade12476783/pixel?tag=ViewContent&amp;noscript=1">

[Product Post] Theme Tip: Changing Message Colors

Posted by Adrian Speyer on Feb 6, 2015 7:33:54 AM
Find me on:

1 minute read

Messages are a handy way to alert your community about news or important information.

Messages

When you create you message you have an opportunity to select the "Appearance" of the message. You can select one of four types: Casual, Information, Alert and Warning. Vanilla already has default colors associated to these four types. For example, a Casual Message will look like the following:

casual_message
Should you wish to change the color of the message, you can apply the change to the appropriate CSS class. To change Casual to be a dark green, add the following to your custom CSS:

.CasualMessage {
background-color: #233302 !important;
}

This will be the result:

casual_message_color
If wish to change the CSS for the other Message types, the following are the appropriate classes.

.AlertMessage
.CasualMessage
.InfoMessage
.WarningMessage

#Bonus Tip#
If you are looking to change the color of links in the messages, here is the code to use:

.CasualMessage a { color: #f00000; }
.AlertMessage a { color: #f00000; }
.InfoMessage a { color: #f00000; }
.WarningMessage a { color: #f00000; }

In the above example, the links will be red. To get different hex color codes you can use this website.

We hope you found these tips helpful. Check under the product category for more product tips.

Topics: News, Product

Related posts

Subscribe to the Community Corner Newsletter and get expert insight and analysis on how to get the most out of your online community every Friday.

Search this blog

Recent Posts

Gaming Launch Guide

Have an Article for Vanilla's Blog?

Send us an email to pr@vanillaforums.com with your topic idea and we'll circle back with our publishing guidelines.