Thursday, August 28, 2008

How to override .NET validator error message font color

I hate the red color in the asp.net validators using the inline style attribute.

If you create a css class defining your color will do no good since the inline style will override your set color.

Instead of setting the FontColor Property in every single control, create a css class with the following code:

.error {
color:#e95e31 !important;
}

This will look like this My Error Message!

No comments:

Post a Comment