0

Suppose the structure is div > p, can I apply styles to the div if p has a certain class name?

div > p.b --> then apply red to div

div > p.c --> another color

This is easy in jquery, but is it possible in pure CSS?

PSL
  • 122,084
  • 19
  • 250
  • 241
Ksthawma
  • 1,157
  • 1
  • 12
  • 28

0 Answers0