a:visited is not working on mozilla but works fine on IE
The visited
style has been removed from Firefox (and most other browsers) in recent versions due to a security issue with it.
The problem is that a malicious web site could work out your browsing history by using it - they would set a visited
colour, produce a load of URLs (even hidden ones so the user doesn't know about it), and check their colour. It caused quite a bit of noise in browser security circles a couple of years ago.
The visited
feature can be switched back on again in Firefox, by going to the security preferences, but it is disabled by default, and most users will have it switched off.
See here for more info on the problem and how Firefox went about fixing it: http://blog.mozilla.com/security/2010/03/31/plugging-the-css-history-leak/
a: visited {text decoration: none} not working in Firefox
This post describes how to do so. Namely, putting outline: 0;
in your a:visited
CSS should do the trick.
text-decoration
only deals with things like underlines and strikethroughs. The problem you're encountering is with outline
that is put around clicked/focused links to tell the user that's what they're hovering over.
Do note that if you remove the outline it won't be apparent where the user is if they're navigating your page with the keyboard.
Browsers don't honor a:visited { text-decoration: none; }
The only CSS property you can apply on a:visited
links in most Webkit-based browsers (like Safari) or Blink-based (Chrome and Opera) is color
. Anything else won't work. It has something to do with browser history stealing. You can read more about it from here:
http://seclists.org/fulldisclosure/2013/May/13
However you can change the style of all links with a {text-decoration: none;}
.
The selector itself is not dangerous, but if you combine it with Javascript's functions like getComputedStyle() things can get pretty ugly and by ugly I mean that other users can view and read your personal browser history.
Mozilla (Gecko engine) limited the selector properties to color
, background-color
, border-*-color
.
Related Topics
CSS :Not() Selector. Apply Style If Parent Does Not Exist
Webkit-Transition for "Top" and "Bottom" Properties
Use Django Template Syntax in a CSS File
How to Autoscale the Font Size to Fit the Contents of a Div
How to Change Background Image Based on Screen Size, Possibly with Bootstrap
Keep Image Ratio Using Max-Width and Max-Height in Ie 11
CSS Child VS Descendent Selector
What's the Trick to Inspect Popout/Dropdown Menu Style with Firebug
Stop Chrome from Auto Styling Input Type=Search
Want to Override Child Element CSS Property by Parent Element
Grails 2.3 Changes CSS Font-Face Url to "Resource:/..."
CSS 3 Gradients for Styling Svg Elements
Use of "Text-Decoration-Color" Is Not Working
Angular Mat-Select Text Color Doesn't Change
Bootstrap 3 Nav-Bar Change Color Cause Showing a White Border or White Line