0

I've read here that background-position is no longer allowed to be modified for a:visited links in CSS due to a security vulnerability. (MSDN info) I've seen a few items that suggest there is a workaround with jQuery or javascript, but I'm not fluent in these languages. Can someone walk through a workaround for a Wordpress setup?

Currently, I have this CSS with the goal to move a sprite image indicating that an article has been read (link has been visited):

.widget-area .widget_recent_entries a {
height: 19px;
width: 90%;
padding-left: 19px;
background: transparent url("images/link-check.png") no-repeat;
}

.widget-area .widget_recent_entries a:hover {
background-position: 0 -19px !important;
}

background-position: 0 -19px !important;
}

I'm not sure if its possible to do the what I'm looking for but if it is, I'm sure a step-by-step would help a lot of people with the same issue and limited experience with jQuery or javascript. For instance, if there is a little code, where in the theme do I put it (header/footer) ?

Thanks in advance for any help!

Andrew
  • 63
  • 6
  • `I've seen a few items that suggest there is a workaround with jQuery or javascript` Any links??? I'd be suprised it exists any workaround for that – A. Wolff Nov 04 '15 at 10:02
  • The only way I can think of is if you manually save where the user had visited (localStorage for example) and use JS to render the links differently. Not the best way to go. – Sgoldy Nov 04 '15 at 11:00
  • @A.Wolff a couple entries I saw on the subject: [http://stackoverflow.com/questions/14357588/styling-avisited-links](http://stackoverflow.com/questions/14357588/styling-avisited-links) and [http://jsfiddle.net/prJUt/](http://jsfiddle.net/prJUt/) – Andrew Nov 05 '15 at 00:18
  • This is outdated answer now. Actually i don't know any workaround for your use case. Like suggested zbove, you could use any persistent data client side as cookie/localstorage but this wouldnt be équivalent to :visited pseudo class – A. Wolff Nov 05 '15 at 08:25

0 Answers0