Is there a way to write a rule set equivalent to the following while only using one .active
selector?
.active #pselect,
.active #bselect,
.active #cselect,
.active #nselect,
.active #iselect {
color: white;
}
Is there a way to write a rule set equivalent to the following while only using one .active
selector?
.active #pselect,
.active #bselect,
.active #cselect,
.active #nselect,
.active #iselect {
color: white;
}
Ideally you would add a class to the elements you're selecting by id. But if that's not possible, you could use an attribute selector:
.active [id$="select"] {
color: white;
}
This particular attribute selector selects all elements with an id value that ends with "select".