Posted by Ben C on 04/17/07 22:06
On 2007-04-17, Jon Slaughter <Jon_Slaughter@Hotmail.com> wrote:
> Is it possible to refer to an a parent element and modify its attributes?
>
> Say I have a ul with some links in it:
>
><ul>
> <li>
> SomeText
> <a href="...">Link</a>
> </li>
></ul
>
>
> Now I want to change the color of SomeText depending on if a is hovered.
Not possible with pseudos. Change in pseudo-state can only affect styles
that apply to descendents, the adjacent sibling, and the descendents of
the adjacent sibling. Never ancestors.
Navigation:
[Reply to this message]
|