June 12, 201313 yr I've created a div tag called "footer", using an ID selector (#footer). I've tried to style the links within this div tag, this is the code I've written. #footer a:link { color: #FFF; text-decoration: underline; } #footer a:visited { color: #FF0; text-decoration: underline; } #footer a:hover { color: #CCC; text-decoration: none; } #footer a:visited:hover { color: #FF0; text-decoration: underline; } They all work perfectly, apart from this one. #footer a:visited:hover { color: #FF0; text-decoration: underline; } When I preview my site in an internet browser and point to a visited link, it takes the underline away. The colours work properly, but the underline disappears (even though I've told it to underline it, as you can see in the code above). Is there anyway I can correct this? Thank you for any help.
June 12, 201313 yr Author a:visited:hover needs to come before a:hover Thank you for your help, I've changed my code to #footer a:link { color: #FFF; text-decoration: underline; } #footer a:visited { color: #FF0; text-decoration: underline; } #footer a:visited:hover { color: #FF0; text-decoration: underline; } #footer a:hover { color: #CCC; text-decoration: none; } But it's still not working properly, is there anything else I can try? Thank you for any help.
June 13, 201313 yr OK, this had me confused but it seems that we can only style the color of the :visited psuedo-class. (Apparently because people figured out a way to determine your browser history?). So any styles other than color will be ignored.More details Here
June 13, 201313 yr Author OK, this had me confused but it seems that we can only style the color of the :visited psuedo-class. (Apparently because people figured out a way to determine your browser history?). So any styles other than color will be ignored. More details Here OK, thank you for your help.
Create an account or sign in to comment