change parent div css on over of child

Solutions on MaxInterview for change parent div css on over of child by the best coders in the world

showing results for - "change parent div css on over of child"
Shaima
18 Apr 2017
1#main-menu > li:hover > a
2{
3  background-color: #F00;
4}
5
6#main-menu >  li > .submenu > li:hover
7{
8  background-color:#00F;
9}
Juan Manuel
07 Nov 2018
1<ul id="main-menu">
2  <li>
3    <a href="#">
4      <i class="fa fa-building-o" aria-hidden="true"></i>
5      Private Limited
6      <i class="fa fa-caret-down"></i>
7    </a>
8    <ul class="submenu">
9      <li><a href="#0">Company</a>
10      </li>
11      <li><a href="#0">Contact</a>
12      </li>
13      <li><a href="#0">Industry</a>
14      </li>
15    </ul>
16  </li>
17</ul>