HTML help - hyperlinked text change colour with mouseover?

Discussion in 'Programming' started by super, Jun 12, 2007.

  1. #1
    Hi, how can I do such a thing in HTML code:
    I need to have hyperlinked text one colour, but when visitor of my site point his/her mouse over that link it change colour to different one.

    Or that is something about CSS ?

    Thanks in advance
     
    super, Jun 12, 2007 IP
  2. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #2
    CSS, using the :hover pseudo class.

    e.g. if you want to change the colour of all links when they are "hovered on" to a hot pink, use:
    a:hover { color: #FF00FF; }
     
    krt, Jun 12, 2007 IP
  3. super

    super Well-Known Member

    Messages:
    1,019
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Thanks...I am new to CSS, hope it wont be that hard to learn this....
     
    super, Jun 12, 2007 IP
  4. Brennan

    Brennan Notable Member

    Messages:
    3,318
    Likes Received:
    198
    Best Answers:
    0
    Trophy Points:
    240
    #4
    Implement the below code into your <head></head> portion of your web page. This is a full example of changing the link properties of your web page. If you wish to just change the link color when moving a mouse over a link you only need the A:hover line.

    <style type="text/css">
    <!--
    A:link { COLOR: black; TEXT-DECORATION: none; font-weight: normal }
    A:visited { COLOR: black; TEXT-DECORATION: none; font-weight: normal }
    A:active { COLOR: black; TEXT-DECORATION: none }
    A:hover { COLOR: blue; TEXT-DECORATION: none; font-weight: none }
    -->
    </style>
     
    Brennan, Jun 12, 2007 IP