Previous Message
Next Message

Re: [css-d] Re: This site looks better in....

Sent by Kevin Smith on 1 February 2002 14:02


On 02.01.2002 1:59 PM, Timothy J. Luoma wrote:

> a.offsite { color: foo ; background-color: bar ; }
> 
> which I then use whenever I am making a link to a site that is not on my
> own domain, like so:
> 
> <a class="offsite" href="http://www.apple.com">Checkout the new iMac!</a>
> 
> Now the only problem with this is that I have to remember to add
> 'class="offsite"' for all such links.
> 
> Is there an easier way?

You could do it with JavaScript:

for(var i=0;i<document.links.length;i++){
    if(document.links[i].href.indexOf('http://yoursite.com')<0)
        document.links[i].style.color=foo;
    }

> Dogma is one of my favorite movies

Thanks.

--
kevin c smith                                      tel: 410.571.9462
[EMAIL-REMOVED]                             http://www.tatnet.com
Previous Message
Next Message

Message thread:

Possibly related: