Home › Forums › CSS › Possible use case for ID selector in CSS? › Reply To: Possible use case for ID selector in CSS?
December 9, 2013 at 12:23 pm
#158009
Participant
If you are using the attribute selector and you have multi search inputs on the page which need to have various styles, then you are going to have to use classes to overwrite those styles.
If I were you I’d just apply a class to each of your input fields.
If they all have some shared styles you could use the input[type=search] selector for just those bits.
input[type=search] {
font: arial;
}
.search-primary {
color: blue;
}
.search-secondary {
color: yellow;
}
have fun…