0

As the title says.. I've a PARENT element that has a CHILD element (two divs here!)

I wanna change the background-color of the parent element when (AND ONLY WHEN) the child element hovered..

so if the parent element has padding and when cursor hovers on the padding the background color [css] doesn't change.. it only changes when the child is hovered..

Can I do it with css or I'll need some javascript?

bfavaretto
  • 69,385
  • 15
  • 102
  • 145
Hamo
  • 147
  • 1
  • 4
  • 11

1 Answers1

0

You will indeed need javascript. Take a look here for some good information about it.

Community
  • 1
  • 1
mash
  • 12,407
  • 3
  • 24
  • 30