Totoquil Posted March 31, 2011 Share Posted March 31, 2011 I've set two different classes for my links. It works in Chrome and IE, but not Firefox.The css is: a.one:link,a:visited{display:inline-block;font-weight:bold;color:#FFFFFF;background-color:#787A00;width:105px;vertical-align: center;text-align:center;padding:4px;text-decoration:none;border-left:5px solid #4B4B38;}a.one:hover,a:active{background-color:#4B4B38;border-left:5px solid #787A00;}a.two:link,a:visited{display:inline-block;font-weight:bold;color:#FFFFFF;background-color:#787A00;width:116px;text-align:center;padding:0px;text-decoration:none;border-left:5px solid #5C5E00;}a.two:hover,a:active{background-color:#4B4B38;border-left:5px solid #66664F;} the width and padding for a.one are replaced the the width and padding of a.two Link to comment Share on other sites More sharing options...
dsonesuk Posted March 31, 2011 Share Posted March 31, 2011 Because you need to add the class name to the a:active and a:visited pseudo classes, when you click these anchors it will search for the last relative css styling, which would be.a.two:link,a:visited{display:inline-block;font-weight:bold;color:#FFFFFF;background-color:#787A00;width:116px;text-align:center;padding:0px;text-decoration:none;border-left:5px solid #5C5E00;}a.two:hover,a:active{background-color:#4B4B38;border-left:5px solid #66664F;}changing toa.one:link,a.one:visited{...}a.one:hover,a.one:active{...}a.two:link,a.two:visited{...}a.two:hover,a.two:active{...}should fix this problem.Also FF for security reasons, will/has prevented the changing of stying for visited links (mainly images), except for basic styling (text color, underline, borders), to prevent hackers identifying which sites users have visited. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.