Re: why doesn't this work- SOLVED

by chip wiegand <chip(at)wiegand.org>

 Date:  Thu, 31 Oct 2002 20:36:52 -0800
 To:  "Peter Williams" <peter.williams(at)hendersons.com.au>
 Cc:  hwg-techniques(at)hwg.org
 References:  simrad com
  todo: View Thread, Original
On Fri, 1 Nov 2002 10:16:23 +1100
"Peter Williams" <peter.williams(at)hendersons.com.au> wrote:
> > -----Original Message-----
> > From: chip.wiegand(at)simrad.com
> > 
> > I am trying to get two differant a href link styles
> > 
> >      a.1:link { color: white; }
> >      a.2:link { color: black; }
> > 
> > works fine in IE but not in Netscape7, Mozilla1.1 or Opera6.
> 
> It looks like you have invented new pseudo elements.
> a:link etc are in the w3c css recommendations.

Well, those come straight from the w3c css2 spec. See section 
5.11.2 at http://www.w3.org/TR/REC-CSS2/selector.html#q15.

At any rate,  I got it working now.  Here is the code:

     a { text-decoration : none; }
     a.links1:link { color: white;
     		     background-color: #6b798c }
     a.links1:visited { color: aqua;
     		        background-color: #6b798c }
     a.links1:hover { color: yellow;
     		     background-color: #6b798c }
     a.links1:active { color: lime;
     		      background-color: #6b798c }
     a.links2:link { color: black;
     		     background-color: #fff }
     a.links2:visited { color: black;
     		        background-color: #fff }
     a.links2:hover { color: maroon;
     		     background-color: #fff }
     a.links2:active { color: lime;
     		      background-color: #fff }

    p *[href]	{ color: black;
		  background-color: white;
		  text-decoration: underline; }

I've run my style sheet through the w3c css validator and it
validates properly.
Thanks for the tips, glad to see the list managers got my other
subscription (from my work email) working properly, thanks.

--
Chip Wiegand

> Maybe if you used css something like:
>  .links1 a:link {stuff;}
>  .links2 a:link {different stuff;}
> 
> And your markup looked something like:
>  <div class="links1>
>  <a href="somwhere">
>  </div>
>  <div class="links2">
>  <a href="somewhereelse">
>  </div>
>  
> It could be working more like what you want?
> 
> --
> Peter Williams
> 
> 

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