Reputation:
Just a quick question, I want to make the bullet point not show on my validation summary and also I want to make the text red. I was just wondering how to do this, please check my code below.
<div class="help-block col-md-12" style="list-style-type:none">
@Html.ValidationSummary(true)
</div>
Upvotes: 2
Views: 4002
Reputation: 4142
Change your call of ValidationSummary
extension method like this:
@Html.ValidationSummary(true, "", new { @class = "custom-validation-summary" })
It will add the css class custom-validation-summary
to the rendered html element which represents the summary, and than you can change the look with css:
<style>
.custom-validation-summary ul {
list-style-type:none;
color: red;
padding: 0;
}
</style>
Here is simple MVC fiddle https://dotnetfiddle.net/wTZbmb
Upvotes: 4