I am using General sibling selectors to show a hidden div when i hover on another div the hover works fine when i tested it to change font color, but after i added the "~ .cat3" to modify the class ".cat3" styles it doesn't work, i also tried using Adjacent sibling selectors as shown in this question but it is also not working. Here is the code:
HTML:
<div class="row subcat" >
<div class="col-md-6 subcatitem">
<a href="link.html">category name</a>
</div>
<div class="col-md-6 cat3">
Category Items
</div>
The CSS:
.cat3{
display: none;
}
.subcatitem a:hover ~ .cat3{
display: block;
}
Thank You
This
won't work because the link is not a sibling of the next div
You could try this though