Reputation: 9646
I have an array of check boxes and jquery validate
plugin applies the label with class error
like this,
<label for="list[]" class="error">This field is required.</label>
I have checked this answer but when i changed it to label[for=list[]]
it didn't work. How can i select it using css?
Here is the FIDDLE
Upvotes: 3
Views: 289
Reputation: 241238
Use quotes around the value. In this case "list[]"
.
[for="list[]"]{
color:red;
}
For more information, check out the documentation on attribute selectors.
Upvotes: 6