HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 1st, 2004, 07:26 AM
markoc's Avatar
markoc markoc is offline
Contributing User
ASP Free Regular (2000 - 2499 posts)
 
Join Date: Nov 2003
Location: UK
Posts: 2,140 markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 15 h 12 m 13 sec
Reputation Power: 201
Question different color hyperlinks

Can anyone please tell me if you can set different hyperlinks with different colors on the same page. If so what code do i have to use?

I've tried different methods but can't get it to work.

Cheers

Reply With Quote
  #2  
Old July 1st, 2004, 10:27 AM
stevemw stevemw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: uk
Posts: 70 stevemw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
You can do this using style sheet classes.

e.g. place this below in your <head> section or in you css file.

<style type="text/css">

a:link.blue {
color : #0000ff;
text-decoration : none;
font-weight : bold;

}

a.blue {
color : #0000aa;
text-decoration : none;
font-weight : bold;

}

a:link.red {
color : #ff0000;
text-decoration : none;
font-weight : bold;

}

a.red {
color : #aa0000;
text-decoration : none;
font-weight : bold;

}

</style>


Then when typing out a link you would use the following:

<a href="http://www.aspfree.com" class="red">Red link</a>

and

<a href="http://www.aspfree.com" class="blue">Blue link</a>

..and so on

Regards

Steve

Reply With Quote
  #3  
Old July 1st, 2004, 11:03 AM
markoc's Avatar
markoc markoc is offline
Contributing User
ASP Free Regular (2000 - 2499 posts)
 
Join Date: Nov 2003
Location: UK
Posts: 2,140 markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 15 h 12 m 13 sec
Reputation Power: 201
different color hyperlinks

cheers for that.

also how do i get the color to change when hover?

Regards

Reply With Quote
  #4  
Old July 1st, 2004, 11:28 AM
stevemw stevemw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: uk
Posts: 70 stevemw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
a:hover {
color : #bfdfff;
text-decoration : underline;


This will make the link color light blue and also underline the link

Reply With Quote
  #5  
Old July 1st, 2004, 11:39 AM
markoc's Avatar
markoc markoc is offline
Contributing User
ASP Free Regular (2000 - 2499 posts)
 
Join Date: Nov 2003
Location: UK
Posts: 2,140 markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 15 h 12 m 13 sec
Reputation Power: 201
different color hyperlinks

yea cheers for that, I had worked it out with what i was doing b4.

Regards

Reply With Quote
  #6  
Old July 2nd, 2004, 04:09 AM
stevemw stevemw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: uk
Posts: 70 stevemw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
You're welcome

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > different color hyperlinks


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway