Asim Posted December 14, 2011 Share Posted December 14, 2011 Every time I do a:visited in never works for me, here is the code: a:link{color: rgb(198, 0, 0);}a:visited{color: rgb(95, 95, 95);text-decoration: line-through;font-style: italic;}a:hover {text-decoration: none;}a:active {color: rgb(22, 96, 131);} text-decoration never works why? I like that when users have visited their links, also italic does not work..! Link to comment Share on other sites More sharing options...
Ingolme Posted December 14, 2011 Share Posted December 14, 2011 Most likely another selector with higher precedence in the stylesheet is changing the text-decoration property. Link to comment Share on other sites More sharing options...
dsonesuk Posted December 14, 2011 Share Posted December 14, 2011 FF limited the use of styling of visited links to (if i remember rightly) color, background-color, border-color, and outine color, because of the ability that can be used to identify a uses history of visited sites. Link to comment Share on other sites More sharing options...
Asim Posted December 14, 2011 Author Share Posted December 14, 2011 Most likely another selector with higher precedence in the stylesheet is changing the text-decoration property. Here is the full CSS code nothing is changing it, *{margin:0px;padding:0px;}body{font-family: Bookman Old Style, Times New Roman, Times;background-color: rgb(204,204,204);color: rgb(0, 0, 0);background-image: url('../Images/bg.png'); /* IMAGE FROM HTTP://WWW.FREEGRAPHICSWORLD.COM*/background-repeat: repeat;background-color: #155F82;} a:link{color: rgb(198, 0, 0);}a:visited{color: rgb(95, 95, 95);text-decoration: line-through;font-style: italic;}a:hover {text-decoration: none;}a:active{color: rgb(22, 96, 131);}h1, h2, h3, h4, h5, h6{font-family: Andalus;}h1{color: rgb(255, 255, 255);font-size: 50px;text-align: center;}h2{color: rgb(0,153,51);}h3{color: rgb(204,51,51);}h4{color: rgb(51,0,204);}h5{color: rgb(0,153,51);}h6{color: rgb(204,51,51);}.article_margin{margin-left: 20px;margin-top: 20px;}.aside_margin{margin-top: 20px;margin-left: 20px;} I use Chrome btw.. Link to comment Share on other sites More sharing options...
Ingolme Posted December 14, 2011 Share Posted December 14, 2011 Testing on my computer, even Firebug doesn't seem to notice that the visited link is styled differently. I guess there is a security feature. Link to comment Share on other sites More sharing options...
dsonesuk Posted December 14, 2011 Share Posted December 14, 2011 It does not work in safari, FF or chrome, and i found this Both the next release versions of Gecko (tentatively named Firefox 3.7) andWebKit (Safari 5) will implement changes to the handling of the :visitedpseudo-class. Google Chrome will, I suppose, also implement this.In short, those browsers will limit the ways the a:visited state can be styled.Color, background-color, and to some extend, outline, border are not affected,as long as you don't use alpha-transparency (rgba()), change the border-style orborder-width, etc. Other changes will be ignored and fall back to what isspecified for the a:link state. This was brought up over a year ago before, and I knew it was being implemented by Firefox, looks like other browser are following. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.