Re: Link Colors

by Andrew McFarland <aamcf(at)aamcf.co.uk>

 Date:  Sat, 09 Feb 2002 02:54:12 +0000
 To:  hwg-style(at)hwg.org
 References:  mac
  todo: View Thread, Original
At 13:47 08/02/02 -0800, kynn(at)idyllmtn.com wrote:
<snip/>
>You can also use <div> and class (or any other selectors) to make links
>different colors in different places. Like this:
>
>.nav a:link { color: red; }

<snip/>

Wouldn't div.nav a:link { color: red} be slightly more efficient? That way 
the browser only has to inspect ancestor DIVs to find if any are from the 
specified class, rather than all ancestor elements.

I'm a big fan of using contextual selectors and DIV elements in this way. 
It seems much more logical to me than putting classes into each element - 
and you can use the DIVs for formatting later on if you want to - see 
http://aamcf.co.uk/temp/div

Andrew

--
http://aamcf.co.uk/

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