Re: CSS here but not there:-)

by =?iso-8859-1?Q?St=E9phane?= Bergeron <stephberg(at)videotron.ca>

 Date:  Fri, 16 Jun 2000 17:15:12 -0400
 To:  hwg-techniques(at)hwg.org
 Cc:  Karen Stafford <webmaster(at)noteworthydesigns.com>
 In-Reply-To:  noteworthydesigns
  todo: View Thread, Original
At 02:16 PM 16/06/00 -0500, you wrote:
>I have a page that has mostly text links (it's a senior newspaper that
>has sections within sections within sections....). Anyway, the main
>links are to the side, then feature story links are in the main area. I
>would like to have the side links ONLY do a color change on mouseover,
>without the feature story links doing that (the page is crying for some
>variety). Is there a way of doing this in CSS, or should I use
>javascript with buttons? The pages are NOT in frames, although with so
>many sections, I may have to resort to that. This had to be thrown
>together quickly.

Hi Karen,

This can be done very easily.  Just declare your styles for your main links=
=20
like you normally would: (A:LINK, A:VISITED, etc) then use classes to set=20
styles for the other links you have.  For example, you would set styles=20
using something like:

A.feature:LINK {
         whatever...
}

A.feature:VISITED { .... etc

and on the page itself you would have <.a href=3D"foo.html"=20
class=3D"feature">Secondary Link Text</a>.  If you had a third level of=
 links=20
you would simply have to create another class.  Surprisingly... this works=
=20
in Netscape 4.72 but not in Opera 4.  IE 5.5 and Netscape 6 also handle=20
this correctly.  The alternate syntax A:LINK.feature is also valid but=20
doesn't work in NS 4.72 or Opera 4.0 b5 (but still works in IE5.5 and NS=20
6... all on Win 98 here).  I'm certain this works in all IE versions from=20
IE 4.0x and greater but I don't have 4.0 or 5.0 to test here.

HTH!

St=E9phane Bergeron

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA