Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2002
    Posts
    20

    Red face Unanswered: 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

  2. #2
    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.

  3. #3
    Join Date
    Dec 2002
    Posts
    20

    Wink Re: Change colour of a link

    Can you give an example of using the VLINK ATTRIBUTE

    Thanks

  4. #4
    Join Date
    Jan 2003
    Location
    Midwest
    Posts
    138
    <body bgcolor="#ffffff" link="#ff0000" vlink="#0099ff">

  5. #5
    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.

    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

  6. #6
    Join Date
    Apr 2003
    Location
    Evansville, Indiana
    Posts
    76

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •