Forgive me if I'm missing the point here, but if you use:

a {
 color : red;
 text-decoration : none;
 border : none;
}
a[href*="site1"] {
  color: #f00;
  background: #555;
}
a[href*="site2"] {
  color: #00f;
  background: #eee;
}
a[href*="site3"] {
  color: #0f0;
  background: #ff0;
}

It works for me. More importantly, it ignores any links containing "site", so in other words, it really does have to be the full domain for it to work. You can see this test here:

http://www.betasite.fsnet.co.uk/gam/attribute_selectors_external.html

HTH,

Bob
----- Original Message ----- From: "tee" <weblis...@gmail.com>
To: <wsg@webstandardsgroup.org>
Sent: Friday, October 22, 2010 9:22 AM
Subject: Re: [WSG] attribute selectors to target external and internal links



[snip]




The http overrules the one with "site.com" value.


Unless I can be certain external links will never share a same word with the site domain name, it's not very safe to use the attributes.

tee









*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to