: Text-decoration under anchor tag I have this snippet: <p><a href="http://www.example.com">Link to example site.</a> </p> a:link{ color:green; text-decoration:none; } a:visited{
I have this snippet:
<p><a href="http://www.example.com">Link to example site.</a> </p>
a:link{
color:green;
text-decoration:none;
}
a:visited{
color:pink;
text-decoration:underline;
}
a:hover{
color:yellow;
text-decoration:underline;
}
Can someone explain why the text-decoration:underline; for a:visited does not work?
More posts by @Karen161
2 Comments
Sorted by latest first Latest Oldest Best
The text-decoration has to be the same on every type of link.
Look at this question from stackoverflow.com
When you remove your text-decoration:none from a:link, a:visited would be underlined.
The functionality of :visited pseudoclass has been restricted in many modern browsers (Fx4, IE9, Chrome) to prevent CSS exploit. You can read about it here, but the crux is:
For many years the CSS :visited selector has been a vector for querying a user’s history. It’s not particularly dangerous by itself, but when it’s combined with getComputedStyle() in JavaScript it means that someone can walk through your history and figure out where you’ve been.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.