-1

I want to select elemtents matches two classes using span:

.class1 *AND* .class2 span div.class3:nth-child(even)

The question ist similar to this one: CSS "and" selector - Can I select elements that have multiple classes?

but I do not use just classes, but also span elements, so this do not work (I think it searches for elements containing the right expression and belong to class1 AND class2.):

.class1.class2 span div.class3:nth-child(even)

Thanks in advance for your help

Community
  • 1
  • 1
  • What is your current HTML? – pavel Feb 13 '15 at 13:29
  • Buddy, I see you are very lost... You should start by learning how to set up the selectors (https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/Selectors) – LcSalazar Feb 13 '15 at 13:40
  • I am using still html 4, and yes I am a little bit lost, its my second week using css :( Thanks for the link. Nevertheless the Problem exists still... – Adrianbs Feb 16 '15 at 08:20

1 Answers1

0

This may suit your needs:

.class1 span div.class3:nth-child(even), .class2 span div.class3:nth-child(even)
Linh N.
  • 21
  • 4
  • Thanks for the answer, but the comma is a logical OR, it selects all elemtents fitting the first expression and all elements fitting the second expression. I want to select just elemtens fitting both expressions at the same time. – Adrianbs Feb 16 '15 at 08:18