.navigation li a:visited { border: solid 3px black; color: #666; } 
 <ul class="navigation"> <li><a href="pages/todo.html">What to do</a></li> <li><a href="pages/lessTraveled.html">The road less traveled</a></li> <li><a href="where-to-stay.html">Where to stay</a></li> <li><a href="pages/doNotMiss.html">Not to be missed</a></li> </ul> 

    1 answer 1

    You cannot refer to the parent <li> directly from a:visited .

    The problem can be solved only by formatting <li> as display: inline (if necessary placing the elements in one line) and changing the color of the border at the very <a> . Only hyperlinks must first be made inline-block or block elements, otherwise the border will not be displayed.