On my webpage for a text box i have requiredfieldvalidator control which displays an error message when the textbox is empty. I can change the color using fore color property of the control dynamically on .cs page using RequiredFieldValida开发者_如何学Pythontor1.Style.Add("Color", "#0000FF");
how can i achieve the same using CSS i tried using
where .ErrorMessage { color: #0000FF; }
but i am still getting the font as red color and i cannot delete the forecolor property (cannot remove "red")
I cannot just put the color in the aspx page itself as this page is shared between different websites and has styles associated with it depening on the website displaying it.
Any help is appreciated.
You should be able to override it like this:
.validator {
color: pink !important;
}
精彩评论