head
has no background and the color is black. On mouseover, its color changes to white with a black background, so far so good but
When I hover over content
, I want to change the color of head
. How can I achieve this? Is it possible using only CSS?
<ul id="meg">
<li><a href="#">head</a>
<div>
<h2>sub head</h2>
<p><a href="#">content</a></p>
<p><a href="#">content</a></p>
</div>
</li>
<li><a href="#">head</a>
<div>
<h2>sub head</h2>
<p><a href="#">content</a></p>
<p><a href="#">content</a></p>
</div>
</li>
</ul>