W3C home > Mailing lists > Public > www-style@w3.org > December 2003

Re: hover affecting multiple classes

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 10 Dec 2003 19:30:21 -0600
Message-ID: <3FD7C8AD.3020203@mit.edu>
To: "Douglas, John" <JDouglas@GTNInc.com>
Cc: "'www-style@w3.org'" <www-style@w3.org>

Douglas, John wrote:

> <a href="#" class=master>stuff</a>
> <div class=slave>wow</div>

> what would be the proper css so that if i hover over "stuff" that "wow"
> changes color?

In this case,

.master:hover + .slave { color: whatever }

In general, you would need to somehow select the .slave thing with a 
selector that passes through .master.
Received on Wednesday, 10 December 2003 20:30:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:25 GMT