Mia Mia - 1 year ago 48
CSS Question

CSS "and" selector - Can I select elements that have multiple tags?

I'm trying to select all of the elements that have both

.checked
and
.featured
tags. So basically, what I'm looking for is an "and" selector; I don't know if there is one or not.

Is there any workaround for cases like this?

Answer Source

You use both (without space between them)

.checked.featured{
   // ...
}

Reference: http://www.w3.org/TR/selectors/#class-html