RE: Changing "link" properties using style sheets...

by Rowland Shaw <Rowland.Shaw(at)crystaldecisions.com>

 Date:  Fri, 18 Jan 2002 01:25:28 -0800
 To:  "'Kynn Bartlett'" <kynn(at)idyllmtn.com>,
Lisa Bradshaw <zibbler(at)mediaone.net>,
Michael Boyer <galdor7(at)hotmail.com>,
hwg-style(at)hwg.org
  todo: View Thread, Original
> At 1:14 PM -0500 1/17/02, Lisa Bradshaw wrote:
> >Set up a seperate class for each anchor you want to affect. For example
you
> >could do something like this:
> >
> >a:link.council { text-decoration: none;
> >  background-color: none;
> >color: #FFFF80
> >  font-size: 12pt;
> >  font-family: arial;
> >  font-weight: bold;
> >       }
> 
> The above is not incorrect.
>
> Sometimes you may need to account for older broken browsers with something
> like this:
>
>   <span class="council">
>     <a href="foo.html">Foo</a>
>   </span>


The CSS for the example you give would be ".council a:link {...}"

For Michael's original code, I'd personally use:

a:link {
  text-decoration: none;
  color: #3F6DE1;
  font-size: 12pt;
  font-family: Arial, sans-serif;
  font-weight: bold;
}

.council, a.council:link {
  /* specified both selectors for specifity and paranoia */
  /* NB Fixed color, and removed stuff that would be inherited from a:link
*/
  background-color: none;
  color: #FFFF80;
}

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

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.