change parent style on child hover code example
Example 1: styles for parent of selector
Short answer: no such selector exists. Use JavaScript
Long answer: by Kaotik below
Example 2: change parent div css on over of child
<ul id="main-menu">
<li>
<a href="#">
<i class="fa fa-building-o" aria-hidden="true"></i>
Private Limited
<i class="fa fa-caret-down"></i>
</a>
<ul class="submenu">
<li><a href="#0">Company</a>
</li>
<li><a href="#0">Contact</a>
</li>
<li><a href="#0">Industry</a>
</li>
</ul>
</li>
</ul>
Example 3: hover on father elemet activates a child element css
/* EXAMPLE
projetos-hover is father; projetos-hover-text is the child
When hover on the father use ">" to aply on a child
*/
.projetos-hover-text {
transform: translateY(-50%);
transition: all 0.2s ease 0s;
}
.projetos-hover:hover > .projetos-hover-text {
transform: translatey(+5%);
}