[thelist] css contextual selector problem

Means, Eric D eric.d.means at boeing.com
Thu Apr 4 08:30:00 CST 2002


>          got a problem with contextual selectors in netscape 4.
> here's my css:
>
> body { background-color: #fff; }
> a:link, a:active { color: #000; text-decoration: underline; }
>
> .head { background-color: #000; }
> .head a:link, .head a:active { color: #fff; text-decoration:
> underline; }
>
>          netscape 4.7 just refuses to apply the correct link color
> to the 'head' class. i tryed also div.head a:etc etc but it won't work
> as well. i used to know contextual selectors were safe (even if now
> i just can't remeber where this rule of mine come from). maybe i'm
> missing something..

Oops.  I need to correct my prior e-mail; I guess I shouldn't reply when I
haven't had the first coffee of the day yet.  :-P

Anyway, a.head:link isn't quite what you were asking for, so ignore that.
As noted by Jay Blanchard, CSS and NS4 are... "quirky" at best.  That said,
the code you supplied more or less works in NS4.77 (the :link style is
applied, but the :active is not), so I'm not entirely sure you'll be able to
find one way that will work in all varieties of Netscape 4.



More information about the thelist mailing list