Below is the HTML code in question:
<div> class="module-title"
<h2 class="title" style="visibility: visible;">
<span>Spantext</span>
Nonspantext
</h2>
</div>
I am looking to change the color of both Spantext and Nonspantext when hovering over the h2 element. However, I cannot modify the HTML code at all.
The issue arises when trying to apply CSS rules:
.title :hover {color:#D01A13;}
In this case, only the Spantext changes color on hover. When using:
.module-title :hover {color:#D01A13;}
the Nonspantext will change color only if hovering over the Spantext, but not vice versa.
Although aware of CSS rules like '+' and '~', implementing them did not produce the desired outcome.