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
  • 123,204
  • 21
  • 253
  • 243
Ksthawma
  • 1,257
  • 1
  • 16
  • 28

0 Answers0