I’m writing a custom web part that is intended to be hosted in SharePoint. The web part has a button, which when pressed performs an action. This action may or may not succeed. If it fails, I’d like to notify the user by displaying a <span> below the button with an error message.
To make this message stand out, I’d like to highlight it in a different colour or font. I’d like to reuse any existing error CSS style if at all possible. Does SharePoint define such a CSS style? If not, what’s the best approach for displaying in-line error messages?
Well, silly me, it was right here on:
http://msdn.microsoft.com/en-us/library/dd586616(v=office.11).aspx
The magic CSS style is
.ms-error, which as Madhur mentioned is colored red.