The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Problem on Visited pseudo-class
I tried the below code for a link,
p.visited a:visited { text-decoration: none; border: 1px solid #ccc; background-color: orange; color: #069; }
But the link changed only its color, but not the rest of the properties, why is that?
The :visited selector is used to select visited links. In your css, only the class a:visited is valid.
It’s because of some privacy related issues. It’s only possible to change different color parts for :visited. See here for more info https://developer.mozilla.org/en-US/docs/CSS/Privacy_and_the_:visited_selector