Results 1 to 2 of 2

Thread: hyperlink

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    hyperlink

    Could someone please explain how it is possible to have a hyperlink and then when you hover over it the color of the text to change to something like grey and when you click on the hyperlink the colour changes and you get >> next to it?
    Can it be done in stylesheet? if so how?
    I have done the same kind of thing using a DataList though.
    Thanks guys.

  2. #2
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375
    Yep, changing the color of a link is done with a style sheet: specifically using the a:hover tag where you specify the attributes of a link when the mouse is moved over it.

    VB Code:
    1. <style><!--
    2.       BODY {
    3.         font-family:Helvetica, Garamond, Arial;
    4.            }
    5.       A:link {
    6.         color: #666666;
    7.         text-decoration: none;}
    8.       A:visited {
    9.         color: #000000;
    10.         text-decoration: none;}
    11.       A:active {
    12.         color: #111111;
    13.         text-decoration: underline;}
    14.       A:hover {
    15.         color: #000000;
    16.         text-decoration: underline;}
    17. --></style>
    18. </head>

    In regards to changing the text of a link. What I would probably do is use the javascript innerHTML property that allows you to change the html of a tag

    links below

    http://msdn.microsoft.com/library/de.../innerhtml.asp

    hth

    Cheers
    MarkusJ

Posting Permissions

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



Click Here to Expand Forum to Full Width