Tome_
Tome_

Reputation: 13

a:visited behaving strange in browsers ( works in IE 10 tho..)

in short, I want each link to have it's own style and im using pseudocasses a:link, a:visited.

Each link has its own class as well (.prvo and .drugo)

.prvo:link {color: green; border: 2px solid green; padding:10px}
.prvo:visited {color: red; border-color: red; }
.prvo:hover{}
.prvo:active{}

.drugo:link {color: blue; border: 2px dashed blue; padding:10px; }
.drugo:visited {color: orange; border-color: orange;}
.drugo:hover{}
.drugo:active{}

Problem: when i click first link, second changes color as well to his a:visited color, which I dont want ofc.

It works as I was expecting onlly in IE 10.

CODEPEN code here

Help, what am I missing out there...

Upvotes: 1

Views: 38

Answers (1)

Jazi
Jazi

Reputation: 6752

This is because both of those links refer to the same place. If You click in one of them, second will be "visited" also.

Upvotes: 1

Related Questions