Why is the code below not functioning?
a:visited {
background-color: yellow;
}
taken from: http://www.w3schools.com/cssref/sel_visited.asp
I am attempting to have two links directed at different destinations but sharing the same container. If either link is visited, I want some notification - either a change in 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;
}
The issue is that when you inspect the code, #LinkA does not encompass #LinkB. How can I nest #LinkB inside #LinkA, or find another method for #bix to respond to visits on either #LinkA or #LinkB.