Re: Link Colors
by Kynn Bartlett <kynn(at)idyllmtn.com>
|
Date: |
Sat, 9 Feb 2002 08:31:48 -0800 |
To: |
Andrew McFarland <aamcf(at)aamcf.co.uk>, hwg-style(at)hwg.org |
References: |
mac ntlworld |
|
todo: View
Thread,
Original
|
|
At 2:54 AM +0000 2/9/02, Andrew McFarland wrote:
>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.
Probably; actually, since you'll have probably one (primary) navigation
bar and one (primary) content section, it makes even more sense to use
an id selector, like:
div#nav a:link { color: red; }
>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
Yeah, I agree mainly, especially since it saves typing. ;)
--Kynn
--
Kynn Bartlett <kynn(at)idyllmtn.com> http://kynn.com
Chief Technologist, Idyll Mountain http://idyllmtn.com
Web Accessibility Expert-for-hire http://kynn.com/resume
Next Book: Teach Yourself CSS in 24 http://cssin24hours.com
HWG hwg-style mailing list archives,
maintained by Webmasters @ IWA