Why doesn't code below work?
a:visited {
background-color: yellow;
}
taken from: http://www.w3schools.com/cssref/sel_visited.asp
What I am trying to do is have two links pointing at two different points but covering the same box. If either link is visited I want to be notified somehow. Either change background-color or border color.
example:
<a id="linkA" href="http://www.w3schools.com/">
<a id="linkB" href ="http://www.w3schools.com/html/">
<div id="bix">Change content if either link is visited</div>
</a>
</a>
CSS:
#bix {
border: 3px solid orange;
}
#linkA #bix {
border: 3px solid green;
}
#linkB #bix {
border: 3px solid red;
}
Problem is that when you inspect the code, #LinkA does not contain #LinkB. How can I make #LinkB inside #LinkA, or any other way to make the #bix react to visits to either #LinkA or #LinkB.