Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get browsers recognise visited links on the form <url>#<anchor>

I have a page whith links of the form <url>?<parameters> and some of the form <url>?<parameters>#<anchor>. There are several different of the latter but one example that can easily be understood looks like this (about):

<a href="http://www.mu_site.com/forum.php?forum=1&thread=1#p5">My forum #1: Tread 1, go to post 5</a>

Now I have these styles attached to the page

    .pageContent {
        FONT-SIZE: 8pt;
        COLOR: #666666;
        FONT-FAMILY: Tahoma, sans-serif;
        text-align: left;
    }
    .pageContent A {
        FONT-SIZE: 8pt; COLOR: #8d8d8d; FONT-FAMILY: Tahoma, sans-serif;
    }
    .pageContent A:hover {
        COLOR: #000000;
    }
    .pageContent A:visited {
        COLOR: #660000;
    }
    
The pageContent style is in use where the links are and everything works almost everywhere.

What puzzles me is that my links of the latter form doesn't get marked as visited. I've experimented with different DOCTYPE settings but I can't get it to work. I've searced the net many times (I've had this problem for more than a year) but either I don't know what to search for or it only happens to me.

like image 856
user1904991 Avatar asked Dec 14 '12 20:12

user1904991


1 Answers

Have you tried the styles in this order?

a:link    { color: red }    /* unvisited links */ <br>
a:visited { color: blue }   /* visited links   */ <br>
a:hover   { color: yellow } /* user hovers     */ <br>
a:active  { color: lime }   /* active links    */ <br>

See reference http://www.w3.org/TR/CSS21/selector.html#x35

like image 147
Pais Avatar answered Nov 15 '22 08:11

Pais