Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Change colour of a link

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-03-03, 05:35
gleech gleech is offline
Registered User
 
Join Date: Dec 2002
Posts: 20
Red face Change colour of a link

Hello

Does anyyone know how to change the colour of a hyper link?

I know if you use the following code, when you click the link, the page changes to the new page and if you go back the colour of the link had changed so you know you have already been there (visited that part)

<A href="/MyIntranet/Contents/MyPageToShow.asp">Page Shown</A>

I've put this style into my code which changes the colour and works fine, but when i click another link, the colour of the previous link changes back to its orignal colour

<head>
<style type="text/css">
<!--
a:link {color: #000000; text-decoration: blink; text-transform: lowercase; }
a:visited {color: #008000; text-decoration: underline; text-transform: lowercase; }
a:active {color: #FF0000; text-decoration: underline; text-transform: lowercase; }
a:hover {color: #000080; text-decoration: underline; text-transform: lowercase; }
/* CSS created in part with the aid of
a Script Writer from http://CodeAve.com */
-->
</style>
</head>

Also, I have a refresh on the page, so when the page refreshes the colour of the clicked link goes back to its orginal colour

What i want to do is have a hyper link that opens a new page in a different browser session, and when clicked the hyper link colour changes, i can do the link to open the new page in another browser session and change the colour of the clicked hyper link, but what i can't figure out it to keep the changed colour after the page has refreshed, and when more than one link is clicked

Thanks for all your help

Gill
Reply With Quote
  #2 (permalink)  
Old 04-03-03, 16:00
dbsaxena dbsaxena is offline
Registered User
 
Join Date: Apr 2003
Location: uk
Posts: 3
Thumbs up Re: Change colour of a link

Use the VLINK ATTRIBUTE to show a different colour for links that have been visited.
__________________
A system can be designed so that there is no obvious fault or so simple that there is obviously no fault.
Reply With Quote
  #3 (permalink)  
Old 04-03-03, 16:14
gleech gleech is offline
Registered User
 
Join Date: Dec 2002
Posts: 20
Wink Re: Change colour of a link

Can you give an example of using the VLINK ATTRIBUTE

Thanks
Reply With Quote
  #4 (permalink)  
Old 04-03-03, 17:47
Memnoch1207 Memnoch1207 is offline
Registered User
 
Join Date: Jan 2003
Location: Midwest
Posts: 138
<body bgcolor="#ffffff" link="#ff0000" vlink="#0099ff">
Reply With Quote
  #5 (permalink)  
Old 04-04-03, 12:14
bciarcia bciarcia is offline
Registered User
 
Join Date: Apr 2003
Location: Connecticut
Posts: 17
Re: Change colour of a link

I know this sounds silly, but move you hover style to the top so the page sees that first, then the visited link next, then link, then active.. it will use what it sees first.

Quote:
Originally posted by gleech
Hello

Does anyyone know how to change the colour of a hyper link?

I know if you use the following code, when you click the link, the page changes to the new page and if you go back the colour of the link had changed so you know you have already been there (visited that part)

<A href="/MyIntranet/Contents/MyPageToShow.asp">Page Shown</A>

I've put this style into my code which changes the colour and works fine, but when i click another link, the colour of the previous link changes back to its orignal colour

<head>
<style type="text/css">
<!--
a:link {color: #000000; text-decoration: blink; text-transform: lowercase; }
a:visited {color: #008000; text-decoration: underline; text-transform: lowercase; }
a:active {color: #FF0000; text-decoration: underline; text-transform: lowercase; }
a:hover {color: #000080; text-decoration: underline; text-transform: lowercase; }
/* CSS created in part with the aid of
a Script Writer from http://CodeAve.com */
-->
</style>
</head>

Also, I have a refresh on the page, so when the page refreshes the colour of the clicked link goes back to its orginal colour

What i want to do is have a hyper link that opens a new page in a different browser session, and when clicked the hyper link colour changes, i can do the link to open the new page in another browser session and change the colour of the clicked hyper link, but what i can't figure out it to keep the changed colour after the page has refreshed, and when more than one link is clicked

Thanks for all your help

Gill
Reply With Quote
  #6 (permalink)  
Old 04-06-03, 03:51
kaeldowdy kaeldowdy is offline
Member
 
Join Date: Apr 2003
Location: Evansville, Indiana
Posts: 75
Lightbulb

Here's what I do for hyperlinks...I use a linked CSS for the anchor tags, amongst other tags.
Code:
a:link { color: #0000CC; } a:visited { color: #511A8B; } a:hover { color: #CC0000; }
Then I reference the CSS in my HTML pages...
Code:
<link href="../global/global.css" rel="stylesheet" type="text/css" />
HTH!

Kael
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On