Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

different look for http, ftp and mailto links

Status
Not open for further replies.

grtfercho

Programmer
Apr 11, 2003
424
US
Is there a way to have a different link color for all href possible values without defining new classes for all the links? If I were to start building the website I would use classes... however, this project I have already has a huge amount of links to different sources... FTP, HTTP and mailto.

I guess the best chance I have so far is doing a global search/replace with the exception of local links that don't start with "http".

I guess the question points to ::
is there something similar to a style like

a [href]{}
a [mailto]{}
a [ftp]{}
etc...

thanks in advance
 
you could give them all ID's and use those to identify em.

So you'd get something like:

<head><style>
.FTP{color: blue; text-decoration: underline;}
.HTTP{color: red; text-decoration: overline;}
.FTP{color: green; text-decoration: underline overline;}
</style></head>

<A HREF=&quot;FTP://blablabla1&quot; ID=&quot;FTP&quot;>bla1</A>
<A HREF=&quot;FTP://blablabla2&quot; ID=&quot;FTP&quot;>bla2</A>
<A HREF=&quot; ID=&quot;HTTP&quot;>bla site</A>
<A HREF=&quot;MAILTO://blablabla&quot; ID=&quot;MAILME&quot;>bla me</A>

I hope this helps,

[bobafett] BobbaFet [bobafett]

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
 
you could give them all ID's and use those to identify em.

So you'd get something like:

<head><style>
.FTP{color: blue; text-decoration: underline;}
.HTTP{color: red; text-decoration: overline;}
.MAILME{color: green; text-decoration: underline overline;}
</style></head>

<A HREF=&quot;FTP://blablabla1&quot; ID=&quot;FTP&quot;>bla1</A>
<A HREF=&quot;FTP://blablabla2&quot; ID=&quot;FTP&quot;>bla2</A>
<A HREF=&quot; ID=&quot;HTTP&quot;>bla site</A>
<A HREF=&quot;MAILTO://blablabla&quot; ID=&quot;MAILME&quot;>bla me</A>

also what you tried requires ID's, then it should work!
I hope this helps,

[bobafett] BobbaFet [bobafett]

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top