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
  • 120,386
  • 19
  • 245
  • 237
Ka Fai Lo
  • 1,017
  • 1
  • 10
  • 27

0 Answers0