Results 1 to 5 of 5

Thread: a:active,hover,link,visited ??

  1. #1
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Post a:active,hover,link,visited ??

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <!-- 
    a1a2a7 : grey
    19b3ff : blue
    -->
    <style>
    a:visited
    {
    	color:#a1a2a7;
    	text-decoration:none;
    }
    a:link
    {
    	color:#a1a2a7;
    	text-decoration:none;
    }
    a:hover
    {
    	color:#19b3ff;
    	font-weight:bold;
    }
    a:active
    {
    	color:#19b3ff;
    	text-decoration:none;
    }
    </style>
    </head>
    
    <body>
    <h3><a href="#">1</a></h3>
    <h3><a href="#">2</a></h3>
    <h3><a href="#">3</a></h3>
    <h3><a href="#">4</a></h3>
    </body>
    </html>
    what i want:
    when the link clicked, the link turn into blue , like when it's hover.

    the link like a mess, are there some kind of rules to put the a:active, hover, link, visited. I've already change the position but it still like a mess.

    thx for your help..

  2. #2
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    HTML Code:
    a:visited
    {
    	color:#19b3ff;
    	text-decoration:none;
    
    a:hover
    {
    	color:#19b3ff;
    	font-weight:bold;
    }
    
    }
    This will give the same font color to the link when it has been visited as to that used during the hover.

  3. #3
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    thx for replying, it works, but i have another problem now. When i open again the page, the link color turn into blue permanently. Why don't it back to Grey / normal color like i describe in my style. appreciate your help

  4. #4
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    Once you have visited a page the link will keep the color you have selected for a:visited until you clear out your browser cache/temporary files.

    Once this is done then the link will go back to the a:link color

  5. The Following User Says Thank You to forum_amnesiac For This Useful Post:

    davelf (09-04-2009)

  6. #5
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    oow i see, thx a lot for your help...

Bookmarks

Posting Permissions

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