[Javascript] Dom rollover

Paul Novitski paul at juniperwebcraft.com
Thu Sep 28 13:26:58 CDT 2006


At 9/28/2006 09:39 AM, Guillaume wrote:
>I'm trying to change the color of several pieces of text in tags ( 
>h1, p and a ) contained in a div called #too when I mousover this div...
>A rollover basically...
>I thought switching node's classes contained inside #too...
>It doesn't work... I can change the background-color, add a colored 
>border... But the h1, p and a tags won't change their colors...


In addition to what others have said:

If the child elements don't change their color with their parent's 
color, my guess is that you've assigned them a background color in 
your stylesheet.  Background color is one of those properties that 
naturally "inherits" from parent to child.  Remove those child 
properties or assign them {background-color: inherit;}.

Regards,
Paul 




More information about the Javascript mailing list