|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
||||
|
||||
|
different color hyperlinks
cheers for that.
also how do i get the color to change when hover? Regards |
|
#4
|
|||
|
|||
|
a:hover {
color : #bfdfff; text-decoration : underline; This will make the link color light blue and also underline the link |
|
#5
|
||||
|
||||
|
different color hyperlinks
yea cheers for that, I had worked it out with what i was doing b4.
Regards |
|
#6
|
|||
|
|||
|
You're welcome
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > different color hyperlinks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|